Skip to content

Add assert{variant}HolidayDatesInYear, assert{variant}HolidaysInYear test methods#3090

Merged
arkid15r merged 9 commits intovacanza:devfrom
PPsyrius:test_in_year
Dec 1, 2025
Merged

Add assert{variant}HolidayDatesInYear, assert{variant}HolidaysInYear test methods#3090
arkid15r merged 9 commits intovacanza:devfrom
PPsyrius:test_in_year

Conversation

@PPsyrius
Copy link
Copy Markdown
Collaborator

Proposed change

I tried to better utilise the now centralised test setups implemented in #2881 by switching to assert{variant}HolidayDatesInYear and assert{variant}HolidaysInYear test methods to avoid duplicate test setups.

While not as blazingly fast as before that PR was implemented, which was ~55-70s (as we've yet to port all remaining countries' tests to the new system - see #3065 ), this should help us a bit.

### Pre-Optimized
110.33s 
111.99s
104.15s
Avg Time: 108.82s

### Post-`InYear` Tests Implementation
99.01s
92.54s
96.70s
Avg Time: 96.08s

Note that this still excludes cases where we did year-specific checks for multiple categories at the same time.

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

@github-actions github-actions bot added the test label Nov 28, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 28, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

48 files out of 155 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ 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 Nov 28, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3090   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18108     18108           
  Branches      2309      2309           
=========================================
  Hits         18108     18108           

☔ 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 November 28, 2025 09:37
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.

Cool idea! 👍

Comment thread tests/common.py Outdated
@PPsyrius PPsyrius marked this pull request as draft November 29, 2025 04:34
@PPsyrius PPsyrius requested a review from KJhellico November 29, 2025 13:09
@PPsyrius PPsyrius marked this pull request as ready for review November 29, 2025 13:09
Comment thread tests/common.py Outdated
Comment thread tests/common.py Outdated
Co-authored-by: ~Jhellico <[email protected]>
Signed-off-by: Panpakorn Siripanich <[email protected]>
@PPsyrius PPsyrius requested a review from KJhellico November 29, 2025 19:37
KJhellico
KJhellico previously approved these changes Nov 30, 2025
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 previously approved these changes Dec 1, 2025
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.

Great improvement 👍

Comment thread tests/common.py
@arkid15r arkid15r dismissed stale reviews from KJhellico and themself via db01f4f December 1, 2025 18:13
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Dec 1, 2025

@arkid15r arkid15r requested a review from KJhellico December 1, 2025 18:14
@arkid15r arkid15r enabled auto-merge December 1, 2025 18:14
@arkid15r arkid15r added this pull request to the merge queue Dec 1, 2025
Merged via the queue into vacanza:dev with commit 3e17b90 Dec 1, 2025
33 checks passed
@arkid15r arkid15r mentioned this pull request Dec 1, 2025
@PPsyrius PPsyrius deleted the test_in_year branch December 2, 2025 02:08
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