test_doxygen_without_sqlite3_support_fails_the_doctor¶
Tests › tests/test_init.py
What this test is for
Why it exists
gh#3, REPORTED FROM A STOCK UBUNTU 22.04 BOX. The distro's doxygen 1.9.1 is built without sqlite3 output; `apt install doxygen` therefore satisfies a `which()` check and every build still fails. doxygen IGNORES the unsupported tag rather than refusing it — it warns, buries that among thousands of suppressed warnings, exits ZERO and writes nothing — so the first observable symptom was "Expected database not found: <path>", naming neither doxygen nor sqlite3 nor anything the reader could act on.
Given
incapable = stub_env / "doxygen"incapable.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")incapable.chmod(0o755)
When
check = init_command._check_doxygen(repo)
Then
- ✓ check.status equals CHECK_FAIL
- ✓ check.detail contains "sqlite3"
- ✓ check.detail.lower() contains "build"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
clew — `main` (clew/cli.py) · 6 of 400 steps
… 171 earlier steps
… 218 later steps
tests/test_init.py:1361 · its file's page
What it checks (3)
assert check.status == CHECK_FAIL, ( f"a doxygen that cannot write the database must not report {check.status!r} — the doctor " f"would then certify an environment in which every build fails" )observes_check_doxygenviacheckassert "sqlite3" in check.detail, "the message must name sqlite3, which is the actual cause"observes_check_doxygenviacheckassert "build" in check.detail.lower(), ( "the message must say this is a BUILD option; telling someone to upgrade the version " "does not necessarily fix it and 22.04's 1.9.1 is not a version problem" )observes_check_doxygenviacheck
Where the product reaches it
main→init_main→diagnose→_check_doxygen(flow)
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.
Also reaches 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CLI-002 measured
- REQ-DDB-INDEX-001 inferred
- REQ-DDB-PIPE-006 measured
- REQ-DDB-PIPE-012 inferred