Skip to content

Fix dead test collection in test_context.py - #54

Merged
coordt merged 1 commit into
masterfrom
fix/issue-49-dead-test-rename
Sep 27, 2026
Merged

coordt merged 1 commit into
masterfrom
fix/issue-49-dead-test-rename

Conversation

@coordt

@coordt coordt commented Sep 27, 2026

Copy link
Copy Markdown
Member

Summary

  • initial_context_merges_with_extra_context was missing the test_ prefix, so pytest never collected it.
  • Once collected, it failed: build_context passes initial_context values through render_expression the same as extra_context, so with render_expression mocked 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 passed
  • uv run pytest -q — 335 passed (12 pre-existing test_git_commands.py errors, unrelated, confirmed present on master)
  • ruff check / ruff format --check — passed
  • mypy — no new errors (17 pre-existing, unrelated to this change)

…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
@github-actions

Copy link
Copy Markdown
Contributor

Version hint: no-release
Current version: 0.9.3
New version (when merged): 0.9.3

Comment ID: Display version hint-auto-generated

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-27 13:17 UTC

@coordt
coordt merged commit 691b34c into master Sep 27, 2026
5 checks passed
@coordt
coordt deleted the fix/issue-49-dead-test-rename branch September 27, 2026 13:16
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.

Dead test: initial_context_merges_with_extra_context is never collected by pytest

1 participant