test_python_call_edges_land_in_db¶
Tests › tests/test_python_ast.py
What this test is for
Why it exists
End-to-end: the Python harvest must actually produce `call_edges` rows, the layer that measured exactly ZERO before this change.
Given
db = _make_py_db(tmp_path)
When
import_ast_call_edges(db, FIXTURE_ROOT)conn = sqlite3.connect(str(db))rows = conn.execute( "SELECT source, COUNT(*) FROM call_edges GROUP BY source ORDER BY source", ).fetchall()
2 more
conn.close()sources = dict(rows)
Then
- ✓ sources.get("ast", 0) is greater than 0
- ✓ sum(sources.values()) is greater than 0
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) · 7 of 400 steps
… 70 earlier steps
… 313 later steps
tests/test_python_ast.py:431 · its file's page
What it checks (2)
assert sources.get("ast", 0) > 0, "no plain-identifier Python call edges"not attributedassert sum(sources.values()) > 0not 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_python_call_edges_land_in_db→_make_py_db→import_ast_call_edgesWhat 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-PIPE-003 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 inferred
- REQ-DDB-WIKI-054 inferred