openelections / openelections-data-wi

Pre-processed election results for Wisconsin elections
9 stars 9 forks source link

Scattering in primaries (post-2010) lacks party #30

Closed nbdavies closed 7 years ago

nbdavies commented 7 years ago

Check out test failures here: https://travis-ci.org/nbdavies/openelections-data-wi/builds/262484146 (These came up because I added tests for elections that were previously untested.)

An example failing assertion:

  Scenario Outline: Tests -- @42.3 20150217__wi__special__primary__ward.csv 
    When I visit the election file
    And I search for CON party candidate Scattering running for State Senate in the VILLAGE OF KEWASKUM WD 6 in Fond du Lac
      Assertion Failed: No record found with expected values
      Captured stdout:
      Expecting Con, Scattering, State Senate, Village Of Kewaskum Wd 6, Fond Du Lac

If the test didn't specify a party for this, it would fail for more than one matching row (since Scattering appears across parties' primaries).

davipo commented 7 years ago

Fixed at commit c707b4d. Improved candidate extraction from column headings, adding many Scattering records.