test_synthesize_doxyfile_declares_strip_from_path¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
The synthesized driver must strip the repo root from stored paths.
Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010
Given
repo = tmp_path / "myrepo"repo.mkdir()
When
doxyfile = synthesize_doxyfile(repo, tmp_path / "build" / "docs.doxygen")strip = parse_doxyfile_value(doxyfile, "STRIP_FROM_PATH")own = tmp_path / "Doxyfile"
2 more
own.write_text("PROJECT_NAME = theirs\n", encoding="utf-8")_build_doxyfile_content(own, None, None)
Then
- ✓ strip holds
- ✓ Path(strip).is_absolute() holds
- ✓ Path(strip) equals repo.resolve()
- ✓ _build_doxyfile_content(own, None, None) does not contain "STRIP_FROM_PATH"
tests/test_build_docs_db.py:84 · its file's page
What it checks (4)
assert strip, "the synthesized driver must declare STRIP_FROM_PATH"observesparse_doxyfile_valueviastripassert Path(strip).is_absolute(), "a relative strip prefix resolves against cwd"observesparse_doxyfile_valueviastripassert Path(strip) == repo.resolve(), "the prefix stripped must be the repo root"observesparse_doxyfile_valueviastripassert "STRIP_FROM_PATH" not in _build_doxyfile_content(own, None, None)observes_build_doxyfile_content
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_synthesize_doxyfile_declares_strip_from_path→synthesize_doxyfile→parse_doxyfile_value→_build_doxyfile_contentWhat 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