test_a_bare_call_reaches_a_RECOVERED_definition¶
Tests › tests/test_bare_call_one_function.py
What this test is for
Why it exists
THE REPORTED SHAPE. doxygen saw the prototype and not the definition, so the only definition row is the one `recover_ast_symbols` wrote, spelled the way the source spells it. The call is to the one function both rows describe, and it must land on the row with the body.
Given
repo, db = _build(tmp_path, _GUARDED_SOURCE, [_PROTOTYPE, _USE_IT])
When
recover_ast_symbols(db, repo)build_call_edges(db)import_ast_call_edges(db, repo)
3 more
conn = sqlite3.connect(str(db))recovered = conn.execute( "SELECT rowid FROM memberdef WHERE name = 'lib_fn' AND dg_source = 'ast'" ).fetchone()[0]conn.close()
Then
- ✓ recover_ast_symbols(db, repo) is at least 1
- ✓ _edges_to(db, "lib_fn") equals [("use_it", recovered, SOURCE_AST)]
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) · 10 of 400 steps
… 70 earlier steps
… 310 later steps
tests/test_bare_call_one_function.py:148 · its file's page
What it checks (2)
assert recover_ast_symbols(db, repo) >= 1, "premise: the guarded definition is recovered"observesrecover_ast_symbolsassert _edges_to(db, "lib_fn") == [("use_it", recovered, SOURCE_AST)]observes_edges_to
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_a_bare_call_reaches_a_RECOVERED_definition→_build→recover_ast_symbols→build_call_edges→import_ast_call_edges→_edges_toWhat 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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 inferred
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-WIKI-054 inferred