def test_ca_statewide_totals_18(dbname): assert (e.contest_total( "2018 General", "California", "US Senate CA", dbname=dbname, ) == 11113364)
def test_presidential(dbname): assert (e.contest_total( election, jurisdiction, f"US President ({abbr})", dbname=dbname, ) == total_pres_votes)
def test_state_senate_totals(dbname): assert (e.contest_total( election, jurisdiction, f"{abbr} Senate District {ssd}", dbname=dbname, ) == total_ssd_votes)
def donttest_state_house_totals(dbname): assert (e.contest_total( "2020 General", f"{jurisdiction}", f"{abbr} House District 1", dbname=dbname, ) == -1)
def test_house_totals(dbname): assert (e.contest_total( "2018 General", "Illinois", "IL House District 10", dbname=dbname, ) == 31649)
def test_presidential(dbname): assert (e.contest_total( "2020 General", f"{jurisdiction}", f"US President ({abbr})", dbname=dbname, ) == 803810)
def donttest_congressional_totals(dbname): assert (e.contest_total( "2020 General", f"{jurisdiction}", f"US House {abbr} District 1", dbname=dbname, ) == -1)
def test_president_dem(dbname): assert (e.contest_total( election, jurisdiction, "US President (PA) (Phila) (Democratic Party)", dbname=dbname, ) == 304190)
def test_state_senate_dem(dbname): assert (e.contest_total( election, jurisdiction, "PA Senate District 1 (Phila) (Democratic Party)", dbname=dbname, ) == 62840)
def test_state_house_totals(dbname): assert (e.contest_total( election, jurisdiction, f"{abbr} House District 116", dbname=dbname, ) == 25615)
def test_attorney_general_dem(dbname): assert (e.contest_total( election, jurisdiction, "PA Attorney General (Phila) (Democratic Party)", dbname=dbname, ) == 228504)
def test_state_senate_totals(dbname): assert (e.contest_total( election, jurisdiction, f"{abbr} Senate District 35", dbname=dbname, ) == 122414)
def test_congressional_totals(dbname): assert (e.contest_total( election, jurisdiction, f"US House {abbr} District 16", dbname=dbname, ) == 315704)
def test_statewide_totals(dbname): assert (e.contest_total( election, jurisdiction, f"{abbr} Auditor General", dbname=dbname, ) == 6274473)
def test_state_rep_totals(dbname): assert (e.contest_total( "2018 General", "Texas", "TX House District 25", dbname=dbname, ) == 40902)
def test_state_rep_republican(dbname): assert (e.contest_total( election, jurisdiction, "PA House District 184 (Phila) (Republican Party)", dbname=dbname, ) == 1192)
def test_senate_totals(dbname): assert (e.contest_total( "2018 General", "Texas", "US Senate TX", dbname=dbname, ) == 8371655)
def test_state_treasurer_republican(dbname): assert (e.contest_total( election, jurisdiction, "PA Treasurer (Phila) (Republican Party)", dbname=dbname, ) == 21082)
def test_senate_totals(dbname): assert (e.contest_total( "2020 General", f"{jurisdiction}", f"US Senate {abbr}", dbname=dbname, ) == 777986)
def test_mn_senate_totals_18(dbname): assert (e.contest_total( "2018 General", "Minnesota", "MN Senate District 13", dbname=dbname, ) == 37842)
def test_statewide_totals(dbname): assert (e.contest_total( "2020 General", f"{jurisdiction}", f"{abbr} Governor", dbname=dbname, ) == 798716)
def test_mn_house_totals_18(dbname): assert (e.contest_total( "2018 General", "Minnesota", "MN House District 13A", dbname=dbname, ) == 18601)
def test_senate_totals(dbname): assert (e.contest_total( "2018 General", "Illinois", "IL Senate District 14", dbname=dbname, ) == 65275)
def test_mn_statewide_totals_18(dbname): assert (e.contest_total( "2018 General", "Minnesota", "MN Governor", dbname=dbname, ) == 2587287)
def test_statewide_totals(dbname): assert (e.contest_total( "2018 General", "Illinois", "IL Governor", dbname=dbname, ) == 4547657)
def test_governor_totals(dbname): assert (e.contest_total( "2018 General", "Texas", "TX Governor", dbname=dbname, ) == 8343443)
def test_congressional_totals(dbname): assert (e.contest_total( election, jurisdiction, f"US House {abbr} District {cd}", dbname=dbname, ) == total_cd_votes)
def test_state_senate_totals(dbname): assert (e.contest_total( "2018 General", "Texas", "TX Senate District 15", dbname=dbname, ) == 234763)
def test_state_house_totals(dbname): assert (e.contest_total( election, jurisdiction, f"{abbr} House District {shd}", dbname=dbname, ) == total_shd_votes)
def test_ca_rep_18(dbname): assert (e.contest_total( "2018 General", "California", "CA House District 60", dbname=dbname, ) == 125660)