test_candidates_are_reported_without_being_adopted

Tests › tests/test_doxyfile_refusal_messages.py

passed Passed in the packaged run.

What this test is for

Why it exists

`discover_doxyfile` still returns None for a stray — the refusal behaviour is unchanged — while the candidates it declined are separately readable, which is what lets the message say where they were. Both halves asserted together, because a change that started ADOPTING strays would fix the message and reintroduce the fixture-indexing defect.

Given

  1. repo = tmp_path / "repo"
  2. (repo / "sample").mkdir(parents=True)
  3. (repo / "sample" / "Doxyfile").write_text("x\n")
→

When

  1. discover_doxyfile(repo)
  2. candidates = rejected_doxyfile_candidates(repo)
  3. (repo / "docs").mkdir()
5 more
  1. (repo / "docs" / "Doxyfile").write_text("x\n")
  2. rejected_doxyfile_candidates(repo)
  3. bare = tmp_path / "bare"
  4. bare.mkdir()
  5. rejected_doxyfile_candidates(bare)
→

Then

  1. ✓ discover_doxyfile(repo) is None
  2. ✓ [p.relative_to(repo).as_posix() for p in candidates] equals ["sample/Doxyfile"]
  3. ✓ discover_doxyfile(repo) equals repo / "docs" / "Doxyfile"
  4. ✓ rejected_doxyfile_candidates(repo) does not contain repo / "docs" / "Doxyfile"
  5. ✓ rejected_doxyfile_candidates(bare) equals []

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

What it checks (5)

  1. assert discover_doxyfile(repo) is None, "a stray must still not be adopted" observes discover_doxyfile
  2. assert [p.relative_to(repo).as_posix() for p in candidates] == ["sample/Doxyfile"] observes rejected_doxyfile_candidates via candidates
  3. assert discover_doxyfile(repo) == repo / "docs" / "Doxyfile" observes discover_doxyfile
  4. assert repo / "docs" / "Doxyfile" not in rejected_doxyfile_candidates(repo) observes rejected_doxyfile_candidates
  5. assert rejected_doxyfile_candidates(bare) == [] observes rejected_doxyfile_candidates

Where the product reaches it

  • main → init_main → diagnose → _check_indexable → discover_doxyfile (flow)

Call flow

test_candidates_are_reported_without_being_adopted→discover_doxyfile→rejected_doxyfile_candidates

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_candidates_are_reported_without_being_adopted · 5 checksdiscover_doxyfileREQ-DDB-INDEX-001 · measured
Also reaches 1 requirement

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