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

Update HolidayBase tests #1447

Merged
merged 2 commits into from Aug 31, 2023
Merged

Conversation

arkid15r
Copy link
Collaborator

Proposed change

Update HolidayBase tests

  • Group tests by category
  • Use stubs instead of real entity objects
  • Use type specific asserts
  • Add HolidayBase::__bool__() tests

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • This PR is filed against beta branch of the repository
  • This PR doesn't contain any merge conflicts and has clean commit history
  • The code style looks good: make pre-commit
  • All tests pass locally: make test, make tox (we strongly encourage adding tests to your code)
  • The related documentation has been added/updated (check off the box for free if no updates is required)

  - Group tests by category
  - Use stubs instead of real entity objects
  - Use type specific asserts
  - Add `HolidayBase::__bool__()` tests
Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

This is very helpful! I had just redesigned Canada, which was used in these tests and was about to change them myself. 👍

tests/test_holiday_base.py Outdated Show resolved Hide resolved
tests/test_holiday_base.py Outdated Show resolved Hide resolved
tests/test_holiday_base.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

PTAL

tests/test_holiday_base.py Outdated Show resolved Hide resolved
tests/test_holiday_base.py Outdated Show resolved Hide resolved
tests/test_holiday_base.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM.

@arkid15r arkid15r merged commit ec22609 into vacanza:beta Aug 31, 2023
22 checks passed
@arkid15r arkid15r deleted the update-holiday-base-tests branch August 31, 2023 16:12
@arkid15r arkid15r mentioned this pull request Sep 4, 2023
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.

None yet

2 participants