test_synthesize_doxyfile_writes_minimal_driver¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
A repo that declares its scope but ships no Doxyfile gets a minimal one: PROJECT_NAME, an ABSOLUTE OUTPUT_DIRECTORY (so output resolves regardless of cwd), and an empty INPUT (the derived scope fills it via replace_input). The forced flags append the rest, so this is all the pipeline needs.
Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010
Given
repo = tmp_path / "myrepo"repo.mkdir()out_dir = tmp_path / "build" / "docs.doxygen"
When
doxyfile = synthesize_doxyfile(repo, out_dir)text = doxyfile.read_text()parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")content = _build_doxyfile_content(doxyfile, None, None, replace_input=False)
Then
- ✓ doxyfile.exists() holds
- ✓ doxyfile.parent equals out_dir
- ✓ text contains "PROJECT_NAME = myrepo"
- ✓ text contains f"OUTPUT_DIRECTORY = {out_dir}"
- ✓ Path(parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")).is_absolute() holds
- ✓ text contains "INPUT ="
- ✓ content contains "GENERATE_SQLITE3 = YES"
tests/test_build_docs_db.py:62 · its file's page
What it checks (7)
assert doxyfile.exists()observessynthesize_doxyfileviadoxyfileassert doxyfile.parent == out_dirobservessynthesize_doxyfileviadoxyfileassert "PROJECT_NAME = myrepo" in textnot attributedassert f"OUTPUT_DIRECTORY = {out_dir}" in textnot attributedassert Path(parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")).is_absolute()observesparse_doxyfile_valueassert "INPUT =" in textnot attributedassert "GENERATE_SQLITE3 = YES" in contentobserves_build_doxyfile_contentviacontent
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_writes_minimal_driver→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