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)
def setUp(self): results = summarize(self.SAMPLE_RESULTS) self.race = results['President']