Skip to content

Commit

Permalink
Release version 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-prodigy committed Jan 14, 2018
1 parent a8681d9 commit 07aaebd
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Version 0.9.1
=============

Released January 14, 2018

- Added tests for Irish calendar
- minor fixes and refactoring


Version 0.9
===========

Expand All @@ -15,6 +24,7 @@ Released January 14, 2018 (PR merging by dr-prodigy)
- Add AU/Queensland The Ekka Show (kirpit)
- Various fixes


Version 0.8.1
=============

Expand Down
10 changes: 7 additions & 3 deletions holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from dateutil.relativedelta import MO, TU, WE, TH, FR, SA, SU
import six

__version__ = '0.9'
__version__ = '0.9.1'


MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7)
Expand Down Expand Up @@ -1510,7 +1510,7 @@ class AU(Australia):


class Germany(HolidayBase):
"""Official holidays for Germany in it's current form.
"""Official holidays for Germany in its current form.
This class doesn't return any holidays before 1990-10-03.
Expand All @@ -1528,7 +1528,7 @@ class Germany(HolidayBase):
are some weired edge cases:
- "Mariä Himmelfahrt" is only a holiday in Bavaria (BY) if your
municipality is mothly catholic which in term depends on census data.
municipality is mostly catholic which in term depends on census data.
Since we don't have this data but most municipalities in Bavaria
*are* mostly catholic, we count that as holiday for whole Bavaria.
- There is an "Augsburger Friedensfest" which only exists in the town
Expand Down Expand Up @@ -1878,6 +1878,10 @@ def __init__(self, **kwargs):
HolidayBase.__init__(self, **kwargs)


class IE(Ireland):
pass


class Spain(HolidayBase):
PROVINCES = ['AND', 'ARG', 'AST', 'CAN', 'CAM', 'CAL', 'CAT', 'CVA',
'EXT', 'GAL', 'IBA', 'ICA', 'MAD', 'MUR', 'NAV', 'PVA', 'RIO']
Expand Down
44 changes: 44 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3464,5 +3464,49 @@ def test_non_holidays(self):
self.assertFalse(date(2016, 1, 2) in self.holidays)


class TestIE(unittest.TestCase):

def setUp(self):
self.irish_holidays = holidays.IE()

def test_new_year_day(self):
self.assertTrue('2017-01-02' in self.irish_holidays)
self.assertTrue('2018-01-01' in self.irish_holidays)

def test_st_patricks_day(self):
self.assertTrue('2017-03-17' in self.irish_holidays)
self.assertTrue('2018-03-17' in self.irish_holidays)

def test_easter_monday(self):
self.assertTrue('2017-04-17' in self.irish_holidays)
self.assertTrue('2018-04-02' in self.irish_holidays)

def test_may_bank_holiday(self):
self.assertTrue('2017-05-01' in self.irish_holidays)
self.assertTrue('2018-05-07' in self.irish_holidays)

def test_june_bank_holiday(self):
self.assertTrue('2017-06-05' in self.irish_holidays)
self.assertTrue('2018-06-04' in self.irish_holidays)

def test_august_bank_holiday(self):
self.assertTrue('2017-08-07' in self.irish_holidays)
self.assertTrue('2018-08-06' in self.irish_holidays)

def test_october_bank_holiday(self):
self.assertTrue('2017-10-30' in self.irish_holidays)
self.assertTrue('2018-10-29' in self.irish_holidays)

def test_christmas_period(self):
self.assertTrue('2015-12-25' in self.irish_holidays)
self.assertTrue('2015-12-28' in self.irish_holidays)
self.assertTrue('2016-12-26' in self.irish_holidays)
self.assertTrue('2016-12-27' in self.irish_holidays)
self.assertTrue('2017-12-25' in self.irish_holidays)
self.assertTrue('2017-12-26' in self.irish_holidays)
self.assertTrue('2018-12-25' in self.irish_holidays)
self.assertTrue('2018-12-26' in self.irish_holidays)


if __name__ == "__main__":
unittest.main()

0 comments on commit 07aaebd

Please sign in to comment.