def test_one_party_one_riding_read_results() -> None: """Test Election.read_results with a file with a single line.""" file = StringIO(SHORT_FILE_CONTENTS) e = Election(date(2012, 10, 30)) e.read_results(file) assert e.popular_vote() == {'Liberal': 113}
def test_read_short_data() -> None: """Test read_results method with short_data""" fo = open('data/short_data.csv', "r") e = Election(date(2000, 2, 8)) e.read_results(fo)