test_a_declared_doxyfile_is_reachable_and_a_missing_one_refuses¶
Tests › tests/test_declaration.py
What this test is for
Why it exists
gh#420. `discover_doxyfile` matches the NAME `Doxyfile` in the repo root, `docs/` and `doc/` and refuses to guess further, because it was once caught selecting a test FIXTURE's Doxyfile to index a whole project. Mbed-TLS ships `doxygen/mbedtls.doxyfile` — wrong directory AND wrong filename — so it was unreachable from discovery, and until this section existed there was no way to state it either. `--doxyfile` could name it on one command line, which is the shape the mandate calls not-a-declaration: unrecorded, unreplayed, and unreachable from the MCP surface.
Verifies REQ-DDB-CONFIG-001
Given
doxydir = tmp_path / "doxygen"doxydir.mkdir()
2 more
(doxydir / "mbedtls.doxyfile").write_text( "INPUT = ../include\nFILE_PATTERNS = *.h\n", encoding="utf-8" )args = SimpleNamespace()
When
applied = apply_options(args, {SECTION_DOXYFILE: "doxygen/mbedtls.doxyfile"}, tmp_path)apply_options(SimpleNamespace(), {SECTION_DOXYFILE: "doxygen/typo.doxyfile"}, tmp_path)ok = SimpleNamespace()apply_options(ok, {"requirements": "nope.yaml"}, tmp_path)
Then
- ✓ KNOWN_SECTIONS contains SECTION_DOXYFILE
- ✓ applied equals [SECTION_DOXYFILE]
- ✓ Path(args.doxyfile) equals doxydir / "mbedtls.doxyfile"
- ✓ raises BuildOptionError
- ✓ str(refusal.value) contains "typo.doxyfile"
- ✓ apply_options(ok, {"requirements": "nope.yaml"}, tmp_path) equals ["requirements"]
tests/test_declaration.py:378 · its file's page
What it checks (5)
assert SECTION_DOXYFILE in KNOWN_SECTIONS, "declarable, or the document-level gate refuses it"not attributedassert applied == [SECTION_DOXYFILE]observesapply_optionsviaappliedassert Path(args.doxyfile) == doxydir / "mbedtls.doxyfile"not attributedassert "typo.doxyfile" in str(refusal.value)not attributedassert apply_options(ok, {"requirements": "nope.yaml"}, tmp_path) == ["requirements"]observesapply_options
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_a_declared_doxyfile_is_reachable_and_a_missing_one_refuses→apply_optionsWhat 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 (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CONFIG-001 | catalog | unknown |