Migrate core runtime tests to source-relative unit modules - #338
Open
juliendenize wants to merge 4 commits into
Open
juliendenize wants to merge 4 commits into
juliendenize wants to merge 4 commits into
Conversation
juliendenize
marked this pull request as ready for review
September 24, 2026 11:43
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move core model, deprecation, and optional-dependency tests out of the legacy test root into source-relative unit modules. Preserve every existing assertion while adding focused checks for shared base-model behavior and small runtime utilities. This PR changes tests only; production behavior and public APIs are unchanged.
Changes
tests/unit/; retain concrete message and chunk filtering cases, warning-key behavior, both cached import states, and exact dependency hints.# type: ignore[assignment]. Assert the exact field and input in itsValidationErrorwhile retaining a passing mypy gate.Review
tests/unit/test_base.pyfor the named filter mappings and model boundary, thentests/unit/test_deprecation.pyandtests/unit/test_imports.pyfor preserved assertions, and finally the new exception and protocol utility tests. No source, CLI, configuration, or contributor-guidance file is changed.Verification
Python 3.12: five focused unit modules, 42 passed both serially and with
-n auto --dist loadfile; 12 base nodes include all three named filter cases.Full
pytest tests/ -q: 1,776 passed, 16 skipped.ruff check testsandruff format --check tests: passed; 74 files formatted.mypy .: passed across 122 source files;pytest --doctest-modules ./src: 53 passed.Python 3.10–3.14 CI collection and execution remain to be verified: the repository workflow skips its test jobs while this PR is a draft.
Tests added or updated for changed behavior
Documentation and public API examples updated where needed (not applicable: test-only changes)
Ruff, mypy, and pytest checks pass locally