tests: give test_llm_tactic_generator the config fixture it asks for - #13
Open
dingf3ng wants to merge 1 commit into
Open
tests: give test_llm_tactic_generator the config fixture it asks for#13dingf3ng wants to merge 1 commit into
dingf3ng wants to merge 1 commit into
Conversation
dingf3ng
force-pushed
the
tests-config-fixture
branch
from
September 2, 2026 07:36
68fe1a5 to
35a4be4
Compare
Its three tests take a `config` argument, supplied by the __main__ block
at the bottom. Under pytest there is no fixture by that name, so all
three error at setup before any test body runs:
E fixture 'config' not found
Adds the fixture. It skips rather than fails when no API key is
configured, because these tests call a live LLM -- an unconfigured
checkout should not go red, and CI should not spend money by default.
with a key: 3 passed
without a key: 3 skipped
__main__ passes config explicitly and is unaffected either way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dingf3ng
force-pushed
the
tests-config-fixture
branch
from
September 2, 2026 07:57
35a4be4 to
2f18c5d
Compare
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.
Why
test_llm_tactic_generator's three tests take aconfigargument.2079f15added the fixture that supplies it — but nothing stops them running without a key, so a plainpyteston an unconfigured checkout calls the OpenAI API for real and bills for it.conftest.pyalready has the machinery for this: tests markedllmare skipped unless--runllmis passed. This module was never marked.What changed
pytestmark = pytest.mark.llm— soconftest.py's existing gate appliesconfigfixture skips instead of failing when no key is configuredResult
Belt and braces: the marker handles the default case, the key check covers
--runllmon a machine without credentials.