test_macro_hop_names_the_macro_that_made_the_edge¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
gh#350. A macro-hop edge is the ONE layer whose edge corresponds to no text in the caller's body — the call is written as a macro invocation, so searching `producer` for `store_set` finds nothing. Before this the caller saw an edge at confidence `resolved` and could not see what produced it.
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))
2 more
rows = conn.execute( "SELECT e.callee_rowid, m.name FROM call_edges e " "JOIN memberdef m ON m.rowid = e.via_macro_rowid " "WHERE e.source = 'macro_hop' ORDER BY e.callee_rowid", ).fetchall()conn.close()
Then
- ✓ rows equals [(3, "STORE_SET_FOO"), (5, "STORE_SET_FOO")]
tests/test_build_docs_db.py:671 · its file's page
What it checks (1)
assert rows == [(3, "STORE_SET_FOO"), (5, "STORE_SET_FOO")]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
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.
Requirements it verifies (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-001 | catalog | unknown |
| REQ-DDB-PIPE-010 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-012 measured