-
-
Notifications
You must be signed in to change notification settings - Fork 557
Update Sri Lanka holidays: testcase name typo fixed #2940
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
Conversation
Summary by CodeRabbit
WalkthroughUpdated Sri Lanka tests to remove the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (34)📓 Common learnings
📚 Learning: 2025-09-12T21:37:10.710Z
Applied to files:
📚 Learning: 2025-08-28T02:42:52.755Z
Applied to files:
📚 Learning: 2025-09-10T14:35:54.603Z
Applied to files:
📚 Learning: 2025-09-14T16:19:23.651Z
Applied to files:
📚 Learning: 2025-09-14T16:02:49.378Z
Applied to files:
📚 Learning: 2025-09-14T16:10:02.766Z
Applied to files:
📚 Learning: 2025-09-14T07:26:25.431Z
Applied to files:
📚 Learning: 2025-08-25T10:51:08.068Z
Applied to files:
📚 Learning: 2025-04-23T14:55:35.504Z
Applied to files:
📚 Learning: 2025-09-03T17:53:29.103Z
Applied to files:
📚 Learning: 2025-04-02T18:38:35.164Z
Applied to files:
📚 Learning: 2025-04-05T04:29:38.042Z
Applied to files:
📚 Learning: 2025-04-05T04:50:40.752Z
Applied to files:
📚 Learning: 2025-04-05T04:33:53.254Z
Applied to files:
📚 Learning: 2025-05-06T21:07:11.577Z
Applied to files:
📚 Learning: 2025-09-10T21:12:39.614Z
Applied to files:
📚 Learning: 2025-06-16T15:48:48.680Z
Applied to files:
📚 Learning: 2025-08-09T18:31:23.218Z
Applied to files:
📚 Learning: 2025-09-14T16:12:41.385Z
Applied to files:
📚 Learning: 2025-09-18T00:35:51.998Z
Applied to files:
📚 Learning: 2025-09-14T16:03:13.558Z
Applied to files:
📚 Learning: 2025-09-14T16:05:55.205Z
Applied to files:
📚 Learning: 2025-04-05T06:49:06.217Z
Applied to files:
📚 Learning: 2025-09-14T16:14:44.966Z
Applied to files:
📚 Learning: 2025-09-14T16:14:44.966Z
Applied to files:
📚 Learning: 2025-09-14T04:41:10.139Z
Applied to files:
📚 Learning: 2025-04-05T04:47:27.213Z
Applied to files:
📚 Learning: 2025-09-03T14:05:10.592Z
Applied to files:
📚 Learning: 2025-04-04T10:52:41.546Z
Applied to files:
📚 Learning: 2025-06-25T10:36:39.909Z
Applied to files:
📚 Learning: 2025-06-25T10:36:39.103Z
Applied to files:
📚 Learning: 2025-06-25T10:39:18.504Z
Applied to files:
📚 Learning: 2025-09-03T16:49:35.246Z
Applied to files:
🧬 Code graph analysis (1)tests/countries/test_sri_lanka.py (2)
⏰ 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). (1)
🔇 Additional comments (5)
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.12.2)tests/countries/test_sri_lanka.py�[1;31mruff failed�[0m Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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 #2940 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 296 296
Lines 17616 17616
Branches 2269 2269
=========================================
Hits 17616 17616 ☔ 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.
LGTM!
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/countries/test_sri_lanka.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:21:59.302Z
Learning: In the Saint Vincent and the Grenadines holiday tests, for holidays without observed rules that only require a single assertHolidayName call, pass the holiday name directly as a string literal rather than storing it in a variable first for cleaner, more concise code.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the standard method name for testing country aliases (ISO codes) is `test_country_aliases`, not `test_aliases`. This naming convention is consistently used across all country test files.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the universally adopted standard method name for testing country aliases (ISO codes) is `test_country_aliases`. This naming convention is used consistently across all 235+ country test files in the repository, with no exceptions using `test_aliases`.
📚 Learning: 2025-04-02T18:38:35.164Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-08-24T13:01:51.370Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the standard method name for testing country aliases (ISO codes) is `test_country_aliases`, not `test_aliases`. This naming convention is consistently used across all country test files.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-06-25T10:36:39.909Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-06-25T10:36:39.103Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_puerto_rico.py:84-108
Timestamp: 2025-06-25T10:36:39.103Z
Learning: In the holidays library, test methods (including localization test methods like test_l10n_th, test_l10n_default) follow a standard library-wide approach of not including docstrings. This is the established convention across the codebase.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-06-25T10:39:18.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_american_samoa.py:83-107
Timestamp: 2025-06-25T10:39:18.504Z
Learning: In the holidays library, test methods (especially localization test methods like test_l10n_th, test_l10n_default) do not require docstrings as this is the standard library-wide approach.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-09-04T08:54:35.319Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_albania.py:40-42
Timestamp: 2025-09-04T08:54:35.319Z
Learning: In the vacanza/holidays project test files, extract holiday name strings to local variables only when they are reused multiple times within the same test method (e.g., used in both assertHolidayName and assertNoHolidayName calls). When a holiday name is used only once, keep it inline rather than extracting it to a variable for the sake of consistency.
Applied to files:
tests/countries/test_sri_lanka.py
📚 Learning: 2025-07-02T18:21:59.302Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:21:59.302Z
Learning: In the Saint Vincent and the Grenadines holiday tests, for holidays without observed rules that only require a single assertHolidayName call, pass the holiday name directly as a string literal rather than storing it in a variable first for cleaner, more concise code.
Applied to files:
tests/countries/test_sri_lanka.py
⏰ 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). (5)
- GitHub Check: Test Python 3.11 on windows-latest
- GitHub Check: Test Python 3.12 on windows-latest
- GitHub Check: Test Python 3.13 on ubuntu-latest
- GitHub Check: Test Python 3.9 on ubuntu-latest
- GitHub Check: Test Python 3.9 on macos-latest
🔇 Additional comments (2)
tests/countries/test_sri_lanka.py (2)
232-232
: Good rename to match project convention (l10n).Method name now aligns with the standard
test_l10n_default
used across countries. No functional changes.
232-272
: No remaining 'test_l10_default' references found — resolved.rg found 0 matches for "test_l10_default" and 199 occurrences of "def test_l10n_default" across the repo; no further action required.
|
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.
👍
Proposed change
As spotted by @KJhellico in #2928
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.