Unfold class-based test cases - #1322
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1322 +/- ##
==========================================
+ Coverage 92.47% 93.37% +0.89%
==========================================
Files 27 27
Lines 4919 4919
==========================================
+ Hits 4549 4593 +44
+ Misses 370 326 -44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the test suite by removing remaining class-based test case wrappers, flattening tests into plain pytest functions and splitting some coverage into more focused modules. While doing so, it also updates a few date/time-related expectations to match current CLDR/Babel behavior and ensures previously-unreached test code is actually executed.
Changes:
- Unwrap class-based tests into top-level pytest test functions (improves discovery/readability).
- Split
DateTimeFormat-focused tests into a dedicatedtests/test_date_time_format.pymodule. - Update some date/time formatting expectations (notably spacing/CLDR-driven output) and move Locale-class tests out of
test_core.py.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tests/test_locale_class.py |
New module containing flattened Locale behavior tests moved out of test_core.py. |
tests/test_dates.py |
Removes class wrappers and updates several expected formatted outputs to align with current data/behavior. |
tests/test_date_time_format.py |
New module housing DateTimeFormat tests previously embedded in test_dates.py. |
tests/test_core.py |
Removes Locale-class tests that were moved into tests/test_locale_class.py. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This PR unwraps the remaining
classes from the tests so we have less unnecessary nesting.Doing this also uncovered that a good hunk of
test_dateswas actually not being run since 14216ed (#940). Oops! For that reason, the last commit also has minor data changes; CLDR had updated, tests hadn't...