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

Refactor get_weekend_days to use WEEKEND_DAYS more intelligently #191

Merged
merged 3 commits into from
May 11, 2017

Conversation

nedlowe
Copy link
Contributor

@nedlowe nedlowe commented May 11, 2017

If WEEKEND_DAYS is provided in the calendar class then use it to define the weekend, otherwise the calendar author needs to implement get_weekend_days as before.

Ned Lowe added 2 commits May 11, 2017 14:12
…ne the weekend, otherwise the calendar author needs to implement get_weekend_days as before.
Copy link
Member

@brunobord brunobord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you could amend your pull-request with a changelog entry, as specified in the github pull-request template

  • Changelog amended with a mention describing your changes.

@@ -82,6 +82,12 @@ def test_year_2013(self):
self.assertIn(date(2013, 10, 18), holidays) # eid al adha
self.assertIn(date(2013, 12, 18), holidays) # National Day

def test_weekend(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this test failing without your patch? I'm unsure...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, you're right.
As soon as the changelog will be amended in your PR and merged, I may start to work on a minor refactor, and adding tests on the test_core module, but don't worry, your patch is an excellent step in the right direction!

@nedlowe
Copy link
Contributor Author

nedlowe commented May 11, 2017

@brunobord Apologies for missing that, my bad.

@brunobord brunobord merged commit e061b1c into workalendar:master May 11, 2017
@brunobord
Copy link
Member

Congrats for your first contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants