Repository navigation
Fix dead test collection in test_context.py - #54
Merged
Merged
Conversation
…ntext Missing test_ prefix meant pytest never collected the test. Once collected, it failed: initial_context values are passed through render_expression like extra_context, so the mocked expectation of "initial_value" was wrong — fixed to "rendered_value". Fixes #49
Contributor
|
Version hint: no-release Comment ID: Display version hint-auto-generated |
Contributor
|
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
initial_context_merges_with_extra_contextwas missing thetest_prefix, so pytest never collected it.build_contextpassesinitial_contextvalues throughrender_expressionthe same asextra_context, so withrender_expressionmocked to always return"rendered_value", the expected"initial_key": "initial_value"was wrong. Corrected to"rendered_value".Fixes #49
Test plan
uv run pytest tests/test_context_builder/test_context.py -q— 8 passeduv run pytest -q— 335 passed (12 pre-existingtest_git_commands.pyerrors, unrelated, confirmed present on master)ruff check/ruff format --check— passedmypy— no new errors (17 pre-existing, unrelated to this change)