[Test] test_generate_calls_llm_router fails when full suite runs (mock state pollution) #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/peregrine#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tests/test_cover_letter.py::test_generate_calls_llm_routerpasses in isolation but fails when the full test suite runs. Discovered during worktree baseline verification for #2 (queue optimizer).Failure
The mock
LLMRouter.complete()is returning unexpected content, indicating a prior test is mutating mock state that this test depends on.Reproduction
Fix direction
Find the test that is leaving
LLMRouter.completepatched or in a dirty state. Likely a missingmock.patch.stopall()or unpairedpatch()context in one of the other test files. Add proper teardown or useautousefixture to reset mock state between tests.Impact
Low — does not affect production code. Pre-existing issue; not introduced by any recent change.