test_doxygen_without_sqlite3_support_fails_the_doctor

Tests › tests/test_init.py

passed Passed in the packaged run.

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

  1. incapable = stub_env / "doxygen"
  2. incapable.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")
  3. incapable.chmod(0o755)
→

When

  1. check = init_command._check_doxygen(repo)
→

Then

  1. ✓ check.status equals CHECK_FAIL
  2. ✓ check.detail contains "sqlite3"
  3. ✓ 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

command-line usercommand-line usercommand-line usercommand-line userclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyother filesother filesother filesother filesloop (line 312)looploop (line 314)looptry (line 1304)trymain172–173. diagnose → _check_mcp_sdk172_check_mcp_sdk +1 more174. _check_doxygen → uses_rustdoc174uses_rustdoc▶ test enters175–176. uses_rustdoc → discover_doxyfile175discover_doxyfile +1 more177. _check_doxygen → _needs_doxygen177_needs_doxygen178. _needs_doxygen → claims178claims179. _check_doxygen → doxygen_supports_sqlite3179doxygen_supports_sqlite3180. doxygen_supports_sqlite3 → clean_subprocess_env180clean_subprocess_env181. diagnose → _check_indexable181_check_indexable182. _check_indexable → discover_doxyfile182discover_doxyfile

… 218 later steps

tests/test_init.py:1361 · its file's page

What it checks (3)

  1. 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_doxygen via check
  2. assert "sqlite3" in check.detail, "the message must name sqlite3, which is the actual cause" observes _check_doxygen via check
  3. assert "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_doxygen via check

Where the product reaches it

  • main → init_main → diagnose → _check_doxygen (flow)

Call flow

test_doxygen_without_sqlite3_support_fails_the_doctor→_check_doxygen

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_doxygen_without_sqlite3_support_fails_the_doctor · 3 checks_check_doxygendoxygen_supports_sqlite3REQ-DDB-CLI-002 · measured_check_doxygenuses_rustdocdiscover_doxyfileREQ-DDB-INDEX-001 · inferred_check_doxygendoxygen_supports_sqlite3clean_subprocess_envREQ-DDB-PIPE-006 · measured_check_doxygen_needs_doxygenREQ-DDB-PIPE-012 · inferred
Also reaches 4 requirements

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