Skip to content

Unfold class-based test cases - #1322

Merged
akx merged 3 commits into
masterfrom
split-core-test
Aug 17, 2026
Merged

Unfold class-based test cases#1322
akx merged 3 commits into
masterfrom
split-core-test

Conversation

@akx

@akx akx commented Aug 17, 2026

Copy link
Copy Markdown
Member

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_dates was 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...

@codspeed-hq

codspeed-hq Bot commented Aug 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 88 untouched benchmarks


Comparing split-core-test (909bbd3) with master (0d2cdfa)

Open in CodSpeed

akx added 2 commits August 17, 2026 14:01
They had actually never been run since 14216ed (January 2023),
since they stopped inheriting from `unittest.TestCase` there...
@akx
akx force-pushed the split-core-test branch from 7317a4e to 909bbd3 Compare August 17, 2026 11:02
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (0d2cdfa) to head (909bbd3).

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     
Flag Coverage Δ
macos-14-3.10 92.45% <ø> (+0.89%) ⬆️
macos-14-3.11 92.39% <ø> (+0.89%) ⬆️
macos-14-3.12 92.60% <ø> (+0.89%) ⬆️
macos-14-3.13 92.60% <ø> (+0.89%) ⬆️
macos-14-3.14 92.57% <ø> (+0.89%) ⬆️
macos-14-3.15 92.57% <ø> (+0.89%) ⬆️
macos-14-3.8 92.33% <ø> (+0.89%) ⬆️
macos-14-3.9 92.39% <ø> (+0.89%) ⬆️
macos-14-pypy3.10 92.45% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.10 92.47% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.11 92.41% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.12 92.62% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.13 92.62% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.14 92.60% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.15 92.60% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.8 92.35% <ø> (+0.89%) ⬆️
ubuntu-24.04-3.9 92.41% <ø> (+0.89%) ⬆️
ubuntu-24.04-pypy3.10 92.47% <ø> (+0.89%) ⬆️
windows-2022-3.10 92.47% <ø> (+0.89%) ⬆️
windows-2022-3.11 92.40% <ø> (+0.89%) ⬆️
windows-2022-3.12 92.61% <ø> (+0.89%) ⬆️
windows-2022-3.13 92.61% <ø> (+0.89%) ⬆️
windows-2022-3.14 92.59% <ø> (+0.89%) ⬆️
windows-2022-3.15 92.59% <ø> (+0.89%) ⬆️
windows-2022-3.8 92.44% <ø> (+0.89%) ⬆️
windows-2022-3.9 92.40% <ø> (+0.89%) ⬆️
windows-2022-pypy3.10 92.47% <ø> (+0.89%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akx
akx requested a lite review from Copilot August 17, 2026 11:09
@akx
akx marked this pull request as ready for review August 17, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dedicated tests/test_date_time_format.py module.
  • 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.

Comment thread tests/test_locale_class.py
Comment thread tests/test_dates.py
Comment thread tests/test_date_time_format.py
@akx
akx merged commit 6ba6701 into master Aug 17, 2026
42 checks passed
@akx
akx deleted the split-core-test branch August 17, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants