test_candidates_are_reported_without_being_adopted¶
Tests › tests/test_doxyfile_refusal_messages.py
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
repo = tmp_path / "repo"(repo / "sample").mkdir(parents=True)(repo / "sample" / "Doxyfile").write_text("x\n")
When
discover_doxyfile(repo)candidates = rejected_doxyfile_candidates(repo)(repo / "docs").mkdir()
5 more
(repo / "docs" / "Doxyfile").write_text("x\n")rejected_doxyfile_candidates(repo)bare = tmp_path / "bare"bare.mkdir()rejected_doxyfile_candidates(bare)
Then
- ✓ discover_doxyfile(repo) is None
- ✓ [p.relative_to(repo).as_posix() for p in candidates] equals ["sample/Doxyfile"]
- ✓ discover_doxyfile(repo) equals repo / "docs" / "Doxyfile"
- ✓ rejected_doxyfile_candidates(repo) does not contain repo / "docs" / "Doxyfile"
- ✓ rejected_doxyfile_candidates(bare) equals []
tests/test_doxyfile_refusal_messages.py:175 · its file's page
What it checks (5)
assert discover_doxyfile(repo) is None, "a stray must still not be adopted"observesdiscover_doxyfileassert [p.relative_to(repo).as_posix() for p in candidates] == ["sample/Doxyfile"]observesrejected_doxyfile_candidatesviacandidatesassert discover_doxyfile(repo) == repo / "docs" / "Doxyfile"observesdiscover_doxyfileassert repo / "docs" / "Doxyfile" not in rejected_doxyfile_candidates(repo)observesrejected_doxyfile_candidatesassert rejected_doxyfile_candidates(bare) == []observesrejected_doxyfile_candidates
Where the product reaches it
main→init_main→diagnose→_check_indexable→discover_doxyfile(flow)
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