Skip to content

Make unexpected warnings test failures#292

Merged
derek73 merged 1 commit into
v2/core-foundationfrom
fix/pytest-filterwarnings-error
Jul 26, 2026
Merged

Make unexpected warnings test failures#292
derek73 merged 1 commit into
v2/core-foundationfrom
fix/pytest-filterwarnings-error

Conversation

@derek73

@derek73 derek73 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds filterwarnings = ["error"] to the pytest config, so any unexpected warning during the suite is a test failure. Warnings are load-bearing API in 2.0 (the multi-word-entry UserWarning, the facade deprecation warnings), and without this a warning regression is invisible — the eight spurious warnings on restoring a 1.4 Constants pickle shipped all the way to the final PR Post-rc1 API polish: StrEnum Role, Parser conveniences, dead-vocabulary repair #290 review this way, with 2,393 tests green around it.
  • Zero fallout: the suite is already warning-disciplined (every legitimately-warning path asserts via pytest.warns or a local simplefilter("error") block), so no ignore entries and no test changes were needed. The list stays a bare "error" — the narrowest possible end state.
  • Guard verified non-vacuous both ways: a scratch reproduction of the historical pickle bug now fails the run (with the correct --rootdir; a scratchpad-rooted run silently skips pyproject.toml — noted for anyone re-verifying), and the guard reaches --doctest-modules items too.

Test Plan

  • uv run pytest -q — 2393 passed, 5 skipped, 11 xfailed (identical to baseline)
  • uv run mypy / uv run ruff check nameparser/ clean
  • uv run sphinx-build -b doctest docs — 177 tests, 0 failures
  • Poison test: a stray warnings.warn in a test file fails the run

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@derek73 derek73 self-assigned this Jul 26, 2026
@derek73
derek73 merged commit 5ad5aa1 into v2/core-foundation Jul 26, 2026
1 check passed
@derek73
derek73 deleted the fix/pytest-filterwarnings-error branch July 26, 2026 21:17
@derek73 derek73 mentioned this pull request Jul 26, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant