Skip to content

Commit

Permalink
Update test coverage to 100% (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico committed Mar 4, 2024
1 parent 7443855 commit 0c98d3d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/countries/test_united_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,18 +1597,23 @@ def test_election_day(self):
)
subdiv_us_territories = {"AS", "GU", "MP", "PR", "UM", "VI"}
for subdiv in set(UnitedStates.subdivisions) - subdiv_us_territories:
self.assertNoHolidayName(name, UnitedStates(categories=UNOFFICIAL), 1844, 1847)
self.assertNoHolidayName(
name, UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=(1844, 1847))
)
self.assertHolidayName(
name,
UnitedStates(categories=UNOFFICIAL),
UnitedStates(subdiv=subdiv, categories=UNOFFICIAL),
dt,
)
for subdiv in subdiv_us_territories:
self.assertNoHolidayName(name, UnitedStates(categories=UNOFFICIAL), range(1865, 2050))
self.assertNoHolidayName(
name, UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=range(1865, 2050))
)

def test_valentines_day(self):
name = "Valentine's Day"
self.assertNoHolidayName(name, UnitedStates(categories=UNOFFICIAL), 1846)
self.assertNoHolidayName(name)
self.assertNoHolidayName(name, UnitedStates(categories=UNOFFICIAL, years=1846))
self.assertHolidayName(
name,
UnitedStates(categories=UNOFFICIAL),
Expand All @@ -1617,6 +1622,7 @@ def test_valentines_day(self):

def test_st_patricks_day(self):
name = "St. Patrick's Day"
self.assertNoHolidayName(name)
self.assertHolidayName(
name,
UnitedStates(categories=UNOFFICIAL),
Expand All @@ -1625,6 +1631,7 @@ def test_st_patricks_day(self):

def test_halloween(self):
name = "Halloween"
self.assertNoHolidayName(name)
self.assertHolidayName(
name,
UnitedStates(categories=UNOFFICIAL),
Expand All @@ -1633,6 +1640,7 @@ def test_halloween(self):

def test_groundhog_day(self):
name = "Groundhog Day"
self.assertNoHolidayName(name)
self.assertHolidayName(
name,
UnitedStates(categories=UNOFFICIAL),
Expand Down

0 comments on commit 0c98d3d

Please sign in to comment.