test_synthesize_doxyfile_writes_minimal_driver

Tests › tests/test_build_docs_db.py

passed Passed in the packaged run.

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

  1. repo = tmp_path / "myrepo"
  2. repo.mkdir()
  3. out_dir = tmp_path / "build" / "docs.doxygen"
→

When

  1. doxyfile = synthesize_doxyfile(repo, out_dir)
  2. text = doxyfile.read_text()
  3. parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")
  4. content = _build_doxyfile_content(doxyfile, None, None, replace_input=False)
→

Then

  1. ✓ doxyfile.exists() holds
  2. ✓ doxyfile.parent equals out_dir
  3. ✓ text contains "PROJECT_NAME = myrepo"
  4. ✓ text contains f"OUTPUT_DIRECTORY = {out_dir}"
  5. ✓ Path(parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")).is_absolute() holds
  6. ✓ text contains "INPUT ="
  7. ✓ content contains "GENERATE_SQLITE3 = YES"

tests/test_build_docs_db.py:62 · its file's page

What it checks (7)

  1. assert doxyfile.exists() observes synthesize_doxyfile via doxyfile
  2. assert doxyfile.parent == out_dir observes synthesize_doxyfile via doxyfile
  3. assert "PROJECT_NAME = myrepo" in text not attributed
  4. assert f"OUTPUT_DIRECTORY = {out_dir}" in text not attributed
  5. assert Path(parse_doxyfile_value(doxyfile, "OUTPUT_DIRECTORY")).is_absolute() observes parse_doxyfile_value
  6. assert "INPUT =" in text not attributed
  7. assert "GENERATE_SQLITE3 = YES" in content observes _build_doxyfile_content via 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_writes_minimal_driver→synthesize_doxyfile→parse_doxyfile_value→_build_doxyfile_content

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.

test_synthesize_doxyfile_writes_minimal_driver · 7 checkssynthesize_doxyfileREQ-DDB-INDEX-001 · measured_build_doxyfile_contentextra_input_clears_excludeREQ-DDB-PIPE-003 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-001catalogunknown
REQ-DDB-PIPE-010catalogunknown
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.