Skip to content

Commit d01bd8e

Browse files
authored
Merge pull request #128 from krivard/feature/drop-minimum-sample-size
Remove minimum sample size test; include unit tests in dev guide
2 parents 3bd01e9 + f2d5abf commit d01bd8e

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

docs/epidata_development.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,29 @@ docker run --rm -p 10080:80 \
106106
delphi_web_epidata
107107
```
108108

109-
## manual
109+
## unit tests
110+
111+
Once the server containers are running, you can run unit tests.
112+
113+
First, build the `delphi_python` image per the
114+
[backend development guide](https://github.com/cmu-delphi/operations/blob/master/docs/backend_development.md#creating-an-image).
115+
Your test sources will live in, and be executed from within, this image.
116+
117+
Then run the test container:
118+
119+
```bash
120+
docker run --rm --network delphi-net delphi_python \
121+
python3 -m undefx.py3tester.py3tester \
122+
repos/delphi/delphi-epidata/tests
123+
```
124+
125+
The final line of output should be similar to the following:
126+
127+
```
128+
All 48 tests passed! 68% (490/711) coverage.
129+
```
130+
131+
## manual tests
110132

111133
You can test your changes manually by:
112134

@@ -195,7 +217,7 @@ Here's a full example based on the `fluview` endpoint:
195217
libraries are better candidates for automated integration tests (and unit
196218
tests, in the case of the python client) than one-off manual tests.
197219

198-
## integration
220+
## integration tests
199221

200222
Writing an integration test is outside of the scope of this document. However,
201223
a number of existing integration tests exist and can be used as a good starting

tests/acquisition/covidcast/test_csv_importer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def make_row(
132132
(make_row(geo_type='state', geo_id='iowa'), 'geo_id'),
133133
(make_row(geo_type='country', geo_id='usa'), 'geo_type'),
134134
(make_row(se='-1'), 'se'),
135-
(make_row(sample_size='3'), 'sample_size'),
136135
(make_row(geo_type=None), 'geo_type'),
137136
(make_row(geo_id=None), 'geo_id'),
138137
(make_row(val=None), 'val'),

0 commit comments

Comments
 (0)