Example #1
0
 def test_tie_race_winner_flags(self):
     "Winner flag should not be assigned to any candidate in a tie race"
     pass
     results = summarize(self.SAMPLE_RESULTS)
     race = results['President']
     for cand in race['candidates']:
         self.assertEqual(cand['winner'], '')
def main():
    fname = 'fake_va_elec_results.csv'
    path = join(dirname(dirname(__file__)), fname)
    download_results(path)
    results = parse_and_clean(path)
    summary = summarize(results)
    write_csv(summary)
Example #3
0
 def test_tie_race_winner_flags(self):
     "Winner flag should not be assigned to any candidate in a tie race"
     pass
     results = summarize(self.SAMPLE_RESULTS)
     race = results['President']
     for cand in race['candidates']:
         self.assertEqual(cand['winner'], '')
Example #4
0
def main():
    fname = 'fake_va_elec_results.csv'
    path = join(dirname(dirname(__file__)), fname)
    download_results(path)
    results = parse_and_clean(path)
    summary = summarize(results)
    write_csv(summary)
Example #5
0
 def setUp(self):
     results = summarize(self.SAMPLE_RESULTS)
     self.race = results['President']
Example #6
0
 def setUp(self):
     results = summarize(self.SAMPLE_RESULTS)
     self.race = results['President']