Closed davipo closed 5 years ago
This branch: https://github.com/nbdavies/openelections-data-wi/tree/test-districts
...has a couple of the pieces necessary:
This branch: https://github.com/davipo/openelections-data-wi/tree/dp-add-district-to-tests
... has an updated format_feature_test.py that handles the district field. (This command-line script converts CSV test data to and from .feature format. Give it a --help
arg for usage info.)
It also includes the CSV test data Nick edited to add district data, and that data converted to .feature format (wi-elections_with_districts.feature). https://github.com/davipo/openelections-data-wi/tree/dp-add-district-to-tests/tests/features
Tests with district field moved to wi-elections.feature and wi-elections.feature.csv
steps.py compares district column in the test file to the actual CSV output
The rest of the parts needed for this to work are in https://github.com/davipo/openelections-data-wi/pull/19.
We could also have the parser know which offices get a district and which don't, and halt or warn if the output data is going to be incorrect.
Got various branches merged on Nov 10, tests passed. I'll create a new issue for having the parser check presence versus absence of district data.
Issue for parser checking district is #46.
We should be testing the district field. It contains a district number for House, Court of Appeals, State Senate, and State Assembly offices.
Also, without the district field, it is difficult to find the data for a (failed) test, because the data is ordered by office, which (in the input) includes the district.