test_a_rejected_candidate_says_where_and_why¶
Tests › tests/test_doxyfile_refusal_messages.py
What this test is for
Why it exists
`discover_doxyfile` refuses to guess among strays rather than picking alphabetically, because it was once caught selecting a test FIXTURE's Doxyfile to index a whole project. The message must carry that reasoning — a bare "not used" invites the reader to conclude the tool failed to find what it plainly did find.
Given
repo = tmp_path / "repo"(repo / "sample").mkdir(parents=True)
3 more
stray = repo / "sample" / "Doxyfile"stray.write_text("PROJECT_NAME = fixture\n")candidates = [stray]
When
outcome = describe_doxyfile_resolution(explicit=None, repo_root=repo, candidates=candidates)lowered = outcome.message.lower()
Then
- ✓ outcome.kind equals DOXYFILE_REJECTED
- ✓ outcome.is_error is false
- ✓ outcome.message contains "sample/Doxyfile"
- ✓ outcome.message contains "--doxyfile"
- ✓ "guess" in lowered or "wrong" in lowered holds
tests/test_doxyfile_refusal_messages.py:110 · its file's page
What it checks (5)
assert outcome.kind == DOXYFILE_REJECTEDobservesdescribe_doxyfile_resolutionviaoutcomeassert not outcome.is_error, "refusing to guess still proceeds via synthesis"observesdescribe_doxyfile_resolutionviaoutcomeassert "sample/Doxyfile" in outcome.message, "it must say WHERE the candidate was found"observesdescribe_doxyfile_resolutionviaoutcomeassert "--doxyfile" in outcome.message, "it must name the flag that selects one"observesdescribe_doxyfile_resolutionviaoutcomeassert "guess" in lowered or "wrong" in lowered, "it must say WHY it was not adopted"not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-001 measured