test_the_refusal_names_the_root_and_the_patterns¶
Tests › tests/test_extra_input_patterns.py
What this test is for
Why it exists
"Done means" for gh#3: an --extra-input root that contributes nothing is an error naming the pattern that excluded it, not a silent no-op. Both halves are load-bearing — the root tells the user which flag to drop, the patterns tell them what to widen, and either alone leaves them guessing.
Given
doxyfile = _doxyfile(tmp_path, "# patterns are forced; this declaration is ignored")_write(tmp_path / "library" / "notes.txt")
When
with caplog.at_level("ERROR"), pytest.raises(SystemExit) as excinfo: _verify_extra_input_is_read(doxyfile, ["library"], None, tmp_path)message = caplog.text
Then
- ✓ excinfo.value.code equals 1
- ✓ message contains "library"
- ✓ message contains "*.h"
- ✓ message contains "FILE_PATTERNS"
tests/test_extra_input_patterns.py:201 · its file's page
What it checks (4)
assert excinfo.value.code == 1not attributedassert "library" in message, "the message must name the root the user passed"not attributedassert "*.h" in message, "the message must name the patterns that excluded it"not attributedassert "FILE_PATTERNS" in message, "the message must name the key to widen"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_the_refusal_names_the_root_and_the_patterns→_doxyfile→_write→_verify_extra_input_is_readWhat 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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-INDEX-001 measured