test_non_fuzzy_evidence_is_tested_per_pair_not_per_row¶
Tests › tests/test_graph_stats.py
What this test is for
Why it exists
A pair with ONE exact row and one fuzzy row has non-fuzzy evidence.
Given
_set_call_edges( own_db, [ (76, 158, CALL_SOURCE_DOXYGEN_SQLITE, CALL_MATCH_EXACT), (76, 158, CALL_SOURCE_AST, CALL_MATCH_FUZZY), (76, 158, CALL_SOURCE_AST_MEMBER, CALL_MATCH_FUZZY), (158, 76, CALL_SOURCE_AST, CALL_MATCH_FUZZY), ], )calls = graph_stats(own_db).calls
When
- —
Then
- ✓ calls.rows_by_confidence[CALL_MATCH_FUZZY] equals 3
- ✓ calls.rows_by_confidence[CALL_MATCH_EXACT] equals 1
- ✓ calls.logical_pairs equals 2
- ✓ calls.pairs_without_nonfuzzy equals 1
- ✓ calls.pairs_without_nonfuzzy_share equals pytest.approx(0.5)
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 · 2 of 226 steps
… 17 earlier steps
… 56 steps between
… 143 later steps
2 more
- clew — `main` (clew/cli.py) · 2 of 400 steps
- `main` (scripts/export_parity.py) · 2 of 203 steps
tests/test_graph_stats.py:141 · its file's page
What it checks (5)
assert calls.rows_by_confidence[CALL_MATCH_FUZZY] == 3not attributedassert calls.rows_by_confidence[CALL_MATCH_EXACT] == 1not attributedassert calls.logical_pairs == 2not attributedassert calls.pairs_without_nonfuzzy == 1not attributedassert calls.pairs_without_nonfuzzy_share == pytest.approx(0.5)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_non_fuzzy_evidence_is_tested_per_pair_not_per_row→_set_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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-008 measured