correct tests for Reformationstage
since 2018 additional provinces in Germany have also
Reformationstag.
@@ -2544,18 +2544,25 @@ class TestDE(unittest.TestCase):
def test_reformationstag(self):
provinces_that_have = {'BB', 'MV', 'SN', 'ST', 'TH'}
+ provinces_that_have_since_2018 = provinces_that_have.union({'HB', 'HH', 'NI', 'SH'})
provinces_that_dont = set(holidays.DE.PROVINCES) - provinces_that_have
+ provinces_that_dont_since_2018 = set(holidays.DE.PROVINCES) - provinces_that_have_since_2018
for province, year in product(provinces_that_have, range(1991, 2050)):
# in 2017 all states got the reformationstag for that year
if year == 2017:
continue
self.assertIn(date(year, 10, 31), self.prov_hols[province])
- for province, year in product(provinces_that_dont, range(1991, 2050)):
+ # additional provinces got this holiday 2018
+ for province, year in product(provinces_that_have_since_2018, range(2018, 2050)):
+ self.assertIn(date(year, 10, 31), self.prov_hols[province])
+ for province, year in product(provinces_that_dont, range(1991, 2017)):
# in 2017 all states got the reformationstag for that year
if year == 2017:
continue
self.assertNotIn(date(year, 10, 31), self.prov_hols[province])
+ for province, year in product(provinces_that_dont_since_2018, range(2018, 2050)):
+ self.assertNotIn(date(year, 10, 31), self.prov_hols[province])
# check the 2017 case where all states have the reformationstag
for province in holidays.DE.PROVINCES:
self.assertIn(date(2017, 10, 31), self.prov_hols[province])
