test_replacing_input_also_clears_the_repo_s_exclude_patterns¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
gh#333. `EXCLUDE_PATTERNS` is the GLOB spelling of `EXCLUDE`, and clearing one while leaving the other standing silently defeated the whole scope change on the target it was built for.
Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010
Given
f = tmp_path / "Doxyfile"f.write_text("EXCLUDE = vendor\nEXCLUDE_PATTERNS = */extern/* */tests/*\n")
When
replaced = _build_doxyfile_content( f, extra_input=["/repo"], extra_exclude=None, replace_input=True )kept = _build_doxyfile_content(f, extra_input=None, extra_exclude=["src/legacy"])
Then
- ✓ replaced contains "\nEXCLUDE_PATTERNS =\n"
- ✓ kept does not contain "\nEXCLUDE_PATTERNS =\n"
- ✓ kept contains "EXCLUDE_PATTERNS = */extern/* */tests/*"
tests/test_build_docs_db.py:271 · its file's page
What it checks (3)
assert "\nEXCLUDE_PATTERNS =\n" in replaced, ( "an INPUT replacement that leaves EXCLUDE_PATTERNS standing admits a tree " "and then drops it again" )observes_build_doxyfile_contentviareplacedassert "\nEXCLUDE_PATTERNS =\n" not in keptobserves_build_doxyfile_contentviakeptassert "EXCLUDE_PATTERNS = */extern/* */tests/*" in keptobserves_build_doxyfile_contentviakept
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.
Requirements it verifies (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-001 | catalog | unknown |
| REQ-DDB-PIPE-010 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-001 measured
- REQ-DDB-PIPE-003 measured