Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Luxembourg #111

Merged
merged 5 commits into from Aug 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG
Expand Up @@ -4,8 +4,7 @@ CHANGELOG
0.5.0 (unreleased)
------------------

- Nothing changed yet.

- Added Luxembourg

0.4.1 (2015-08-05)
------------------
Expand Down
1 change: 1 addition & 0 deletions README.rst
Expand Up @@ -86,6 +86,7 @@ Europe
* Hungary
* Iceland
* Italy
* Luxembourg
* Norway
* Poland
* Portugal
Expand Down
15 changes: 15 additions & 0 deletions workalendar/europe.py
Expand Up @@ -150,6 +150,21 @@ class France(WesternCalendar, ChristianMixin):
)


class Luxembourg(WesternCalendar, ChristianMixin):
"Luxembourg"
include_easter_monday = True
include_ascension = True
include_whit_monday = True
include_all_saints = True
include_assumption = True
include_boxing_day = True

FIXED_HOLIDAYS = WesternCalendar.FIXED_HOLIDAYS + (
(5, 1, "Labour Day"),
(6, 23, "Luxembourg National Holiday"),
)


class FranceAlsaceMoselle(France):
"France Alsace/Moselle"
include_good_friday = True
Expand Down
19 changes: 19 additions & 0 deletions workalendar/tests/test_europe.py
Expand Up @@ -10,6 +10,7 @@
from workalendar.europe import Hungary
from workalendar.europe import Iceland
from workalendar.europe import Italy
from workalendar.europe import Luxembourg
from workalendar.europe import Norway
from workalendar.europe import Poland
from workalendar.europe import Portugal
Expand Down Expand Up @@ -326,6 +327,24 @@ def test_year_2013(self):
self.assertIn(date(2013, 12, 26), holidays) # San Stefano


class LuxembourgTest(GenericCalendarTest):

cal_class = Luxembourg

def test_year_2016(self):
holidays = self.cal.holidays_set(2016)
self.assertIn(date(2016, 1, 1), holidays) # new year
self.assertIn(date(2016, 3, 28), holidays) # easter
self.assertIn(date(2016, 5, 1), holidays) # labour day
self.assertIn(date(2016, 5, 5), holidays) # Ascension
self.assertIn(date(2016, 5, 16), holidays) # Pentecote
self.assertIn(date(2016, 6, 23), holidays) # Luxembourg National Day
self.assertIn(date(2016, 8, 15), holidays) # Assomption
self.assertIn(date(2016, 11, 1), holidays) # Toussaint
self.assertIn(date(2016, 12, 25), holidays) # Christmas
self.assertIn(date(2016, 12, 26), holidays) # St. Stephen´s Day


class UnitedKingdomTest(GenericCalendarTest):
cal_class = UnitedKingdom

Expand Down