Skip to content

Migrate I-L countries to new test case standards#3187

Merged
arkid15r merged 11 commits intovacanza:devfrom
PPsyrius:i_l_countries
Jan 6, 2026
Merged

Migrate I-L countries to new test case standards#3187
arkid15r merged 11 commits intovacanza:devfrom
PPsyrius:i_l_countries

Conversation

@PPsyrius
Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius commented Jan 2, 2026

Proposed change

Migrate I-L countries to new test case standards (except India, as they're supposed to get full refactor as part of WoC anyway)

Part of #3065

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/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

Failed to post review comments

Summary by CodeRabbit

  • Refactor

    • Minor holiday naming and comment/formatting cleanup across several country definitions.
  • Tests

    • Large expansion and rework of country test suites: many per-holiday tests added, dynamic multi‑year ranges adopted, explicit observed vs non‑observed checks, improved localization coverage, new range/count helpers, and numerous test methods renamed or split for finer-grained validation across many countries.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Refactors two small country modules and converts many country test suites to per‑holiday, range‑aware tests; standardizes observed/non‑observed handling, introduces category-aware test helpers, expands Islamic holiday coverage, and adds numerous localization checks.

Changes

Cohort / File(s) Summary
Production — small refactors
holidays/countries/jordan.py, holidays/countries/kyrgyzstan.py
Minor local refactor in Jordan (reuse local name = tr("...") for repeated Eid labels) and comment/whitespace/name tweaks in Kyrgyzstan. No behavioral/API changes.
Gulf / Middle East tests
tests/countries/test_jordan.py, tests/countries/test_kuwait.py, tests/countries/test_iran.py
Added extensive per‑holiday tests for Gregorian and Islamic (no‑estimated) holidays, explicit multi‑year date assertions, holiday/holiday‑variant checks, and l10n verifications.
Large test-suite migrations — range-based setup
tests/countries/test_iceland.py, tests/countries/test_ireland.py, tests/countries/test_isle_of_man.py, tests/countries/test_israel.py, tests/countries/test_ivory_coast.py, tests/countries/test_jamaica.py, tests/countries/test_jersey.py, tests/countries/test_kazakhstan.py, tests/countries/test_kenya.py, tests/countries/test_kiribati.py, tests/countries/test_latvia.py, tests/countries/test_lesotho.py, tests/countries/test_liberia.py, tests/countries/test_libya.py, tests/countries/test_liechtenstein.py, tests/countries/test_lithuania.py, tests/countries/test_luxembourg.py
Removed explicit year ranges from setUpClass in many tests; migrated assertions to use self.full_range / self.start_year / self.end_year; renamed and split tests into per‑holiday methods; updated observed/substitute‑day assertions.
Test infra — category‑aware helpers & new assertions
tests/countries/test_iraq.py, tests/countries/test_laos.py, tests/countries/test_lebanon.py
Introduced and used category-aware helpers (Christian/Hebrew/Sabian/Yazidi/Bank/Government/IslamicNoEstimated helpers), count-based assertions, and refactored tests to rely on these helpers and dynamic ranges.
Observed / non‑observed handling (standardization)
tests/countries/* (multiple files referenced above)
Standardized observed-date sequences (obs_dts), substitute-day naming, and clarified observed vs non‑observed assertions across many country test modules.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • KJhellico
  • arkid15r

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective of the pull request: migrating test cases for countries starting with I-L to new standards.
Description check ✅ Passed The description provides relevant context about the migration to new test case standards, references the related issue, and explains the exclusion of India.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6a98b0e) to head (22706a5).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3187   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18307     18309    +2     
  Branches      2337      2337           
=========================================
+ Hits         18307     18309    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PPsyrius PPsyrius marked this pull request as ready for review January 2, 2026 05:35
Copy link
Copy Markdown
Collaborator

@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.

LGTM

Comment thread tests/countries/test_liberia.py Outdated
@arkid15r arkid15r enabled auto-merge January 5, 2026 00:21
@PPsyrius PPsyrius requested a review from arkid15r January 5, 2026 05:18
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 5, 2026
arkid15r
arkid15r previously approved these changes Jan 5, 2026
@arkid15r arkid15r added this pull request to the merge queue Jan 5, 2026
@KJhellico KJhellico removed this pull request from the merge queue due to a manual request Jan 5, 2026
Comment thread tests/countries/test_israel.py Outdated
Comment thread tests/countries/test_kazakhstan.py
Comment thread tests/countries/test_kazakhstan.py Outdated
Comment thread tests/countries/test_kazakhstan.py Outdated
Comment thread tests/countries/test_iraq.py
Comment thread tests/countries/test_kenya.py Outdated
Comment thread tests/countries/test_lebanon.py Outdated
Comment thread tests/countries/test_lebanon.py Outdated
@PPsyrius PPsyrius dismissed stale reviews from arkid15r and coderabbitai[bot] via 1b0b650 January 6, 2026 04:33
@PPsyrius PPsyrius requested review from KJhellico and arkid15r January 6, 2026 05:46
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 6, 2026
Co-authored-by: ~Jhellico <[email protected]>
Signed-off-by: Panpakorn Siripanich <[email protected]>
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 6, 2026
Comment thread tests/countries/test_kazakhstan.py Outdated
Co-authored-by: ~Jhellico <[email protected]>
Signed-off-by: Panpakorn Siripanich <[email protected]>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

Copy link
Copy Markdown
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 added this pull request to the merge queue Jan 6, 2026
Merged via the queue into vacanza:dev with commit f5203bd Jan 6, 2026
33 checks passed
@PPsyrius PPsyrius deleted the i_l_countries branch January 7, 2026 02:30
@KJhellico KJhellico mentioned this pull request Jan 19, 2026
@coderabbitai coderabbitai bot mentioned this pull request Feb 12, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants