-
-
Notifications
You must be signed in to change notification settings - Fork 558
Fix working day test #2950
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
Fix working day test #2950
Conversation
Summary by CodeRabbit
WalkthroughReplaced a weekend check in tests/common.py to use the public is_weekend(dt) instead of the internal _is_weekend(parse(dt)). is_working_day(dt) usage is unchanged. No modifications to public APIs or exported declarations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Ruff (0.13.1)tests/common.py�[1;31mruff failed�[0m Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2950 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 299 299
Lines 17834 17834
Branches 2295 2295
=========================================
Hits 17834 17834 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
tests/common.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_botswana.py:59-59
Timestamp: 2025-09-14T16:23:46.707Z
Learning: In Botswana's holiday tests, assertNonObservedHoliday(dt) is used to verify that certain holidays (like Easter holidays) stay on their original dates regardless of the observed holiday system, which is different from assertNoNonObservedHoliday that checks for absence of non-observed holidays.
📚 Learning: 2025-09-03T18:29:09.398Z
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:76-76
Timestamp: 2025-09-03T18:29:09.398Z
Learning: The assertNoNonObservedHoliday method in tests/common.py accepts a holidays object as its first parameter, followed by the dates to check. Usage like assertNoNonObservedHoliday(self.government_holidays_non_observed, obs_dt) is correct and intended behavior.
Applied to files:
tests/common.py
📚 Learning: 2025-09-14T16:23:46.707Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_botswana.py:59-59
Timestamp: 2025-09-14T16:23:46.707Z
Learning: In Botswana's holiday tests, assertNonObservedHoliday(dt) is used to verify that certain holidays (like Easter holidays) stay on their original dates regardless of the observed holiday system, which is different from assertNoNonObservedHoliday that checks for absence of non-observed holidays.
Applied to files:
tests/common.py
📚 Learning: 2025-09-14T16:23:46.707Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_botswana.py:59-59
Timestamp: 2025-09-14T16:23:46.707Z
Learning: The method assertNonObservedHoliday(dt) is a valid assertion method in the holidays test framework that verifies holidays occur on their original (non-observed) dates, which is different from assertNoNonObservedHoliday that checks for absence of non-observed holidays. It's used to test that certain holidays stay on fixed dates regardless of observed holiday rules.
Applied to files:
tests/common.py
🧬 Code graph analysis (1)
tests/common.py (1)
holidays/holiday_base.py (1)
is_weekend
(1141-1151)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test docs build
- GitHub Check: Build distribution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🛠️
Proposed change
Fix working day test.
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.