test_caller_of_two_same_named_functions_keeps_both¶
Tests › tests/test_dominated_edges.py
What this test is for
Why it exists
THE FALSE-DELETION GUARD, and the test to break first when changing this rule.
Given
conn = _index( _HELPERS, [ (10, 11, CALL_SOURCE_DOXYGEN_SQLITE, CALL_MATCH_EXACT), (10, 12, CALL_SOURCE_DOXYGEN_SQLITE, CALL_MATCH_EXACT), (10, 11, CALL_SOURCE_AST_MEMBER, CALL_MATCH_FUZZY), (10, 12, CALL_SOURCE_AST_MEMBER, CALL_MATCH_FUZZY), (10, 13, CALL_SOURCE_AST_MEMBER, CALL_MATCH_FUZZY), ], )
When
prune_dominated_fuzzy_edges(conn)survivors = _rows(conn)
Then
- ✓ prune_dominated_fuzzy_edges(conn) equals 1
- ✓ survivors contains (10, 11, CALL_SOURCE_DOXYGEN_SQLITE)
- ✓ survivors contains (10, 12, CALL_SOURCE_DOXYGEN_SQLITE)
- ✓ survivors contains (10, 11, CALL_SOURCE_AST_MEMBER)
- ✓ survivors contains (10, 12, CALL_SOURCE_AST_MEMBER)
- ✓ survivors does not contain (10, 13, CALL_SOURCE_AST_MEMBER)
tests/test_dominated_edges.py:139 · its file's page
What it checks (6)
assert prune_dominated_fuzzy_edges(conn) == 1observesprune_dominated_fuzzy_edgesassert (10, 11, CALL_SOURCE_DOXYGEN_SQLITE) in survivorsobserves_rowsviasurvivorsassert (10, 12, CALL_SOURCE_DOXYGEN_SQLITE) in survivorsobserves_rowsviasurvivorsassert (10, 11, CALL_SOURCE_AST_MEMBER) in survivors, "confirmed callee lost its AST row"observes_rowsviasurvivorsassert (10, 12, CALL_SOURCE_AST_MEMBER) in survivors, "confirmed callee lost its AST row"observes_rowsviasurvivorsassert (10, 13, CALL_SOURCE_AST_MEMBER) not in survivorsobserves_rowsviasurvivors
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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-009 measured
- REQ-DDB-QUERY-003 measured