test_a_rejected_candidate_says_where_and_why

Tests › tests/test_doxyfile_refusal_messages.py

passed Passed in the packaged run.

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

  1. repo = tmp_path / "repo"
  2. (repo / "sample").mkdir(parents=True)
3 more
  1. stray = repo / "sample" / "Doxyfile"
  2. stray.write_text("PROJECT_NAME = fixture\n")
  3. candidates = [stray]
→

When

  1. outcome = describe_doxyfile_resolution(explicit=None, repo_root=repo, candidates=candidates)
  2. lowered = outcome.message.lower()
→

Then

  1. ✓ outcome.kind equals DOXYFILE_REJECTED
  2. ✓ outcome.is_error is false
  3. ✓ outcome.message contains "sample/Doxyfile"
  4. ✓ outcome.message contains "--doxyfile"
  5. ✓ "guess" in lowered or "wrong" in lowered holds

tests/test_doxyfile_refusal_messages.py:110 · its file's page

What it checks (5)

  1. assert outcome.kind == DOXYFILE_REJECTED observes describe_doxyfile_resolution via outcome
  2. assert not outcome.is_error, "refusing to guess still proceeds via synthesis" observes describe_doxyfile_resolution via outcome
  3. assert "sample/Doxyfile" in outcome.message, "it must say WHERE the candidate was found" observes describe_doxyfile_resolution via outcome
  4. assert "--doxyfile" in outcome.message, "it must name the flag that selects one" observes describe_doxyfile_resolution via outcome
  5. assert "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

test_a_rejected_candidate_says_where_and_why→describe_doxyfile_resolution

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.

test_a_rejected_candidate_says_where_and_why · 5 checksdescribe_doxyfile_resolutionREQ-DDB-INDEX-001 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.