test_the_query_layer_quotes_doxygens_own_expansion_verbatim¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
THE CONTROL THIS TASK ASKED FOR: the text a caller reads must be doxygen's own `initializer` for that macro, character for character. Comparing against the fixture's literal would only prove the fixture agrees with itself, so the expected value is READ BACK from `memberdef` in the assertion.
Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010
Given
- —
When
build_call_edges(macro_hop_db)import_macro_hop_edges(macro_hop_db)conn = sqlite3.connect(str(macro_hop_db))
3 more
expected = conn.execute("SELECT initializer FROM memberdef WHERE rowid=2").fetchone()[0]conn.close()callees = {e.name: e for e in q.callees(macro_hop_db, "producer")}
Then
- ✓ callees["store_set"].via_macro equals "STORE_SET_FOO"
- ✓ callees["store_set"].via_macro_expansion equals expected
- ✓ expected holds
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.
Look up one name: everything the index holds about it · 10 of 226 steps
… 17 earlier steps
… 23 steps between
… 81 steps between
… 37 steps between
… 15 steps between
… 21 later steps
3 more
- Build this wiki from the index · 7 of 400 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/test_build_docs_db.py:731 · its file's page
What it checks (3)
assert callees["store_set"].via_macro == "STORE_SET_FOO"observescalleesviacalleesassert callees["store_set"].via_macro_expansion == expectedobservescalleesviacalleesassert expected, "the fixture must carry a non-empty expansion or this asserts nothing"not attributed
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_the_query_layer_quotes_doxygens_own_expansion_verbatim→build_call_edges→import_macro_hop_edges→calleesWhat 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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-009 measured
- REQ-DDB-QUERY-010 measured
- REQ-DDB-SCHEMA-012 measured