test_virtual_override_of_the_anchor_is_kept

Tests › tests/test_dominated_edges.py

passed Passed in the packaged run.

What this test is for

Why it exists

Template-method dispatch: a base `generate()` calls the protected virtual `do_generate()`, and the real dynamic target is the derived override. The fan-out row is the ONLY edge that reaches it, so deleting it would remove genuine dispatch reach — 48 rows of exactly this shape on entropic.

Given

  1. conn = _index( [ (20, "generate", "Result Backend::generate"), (21, "do_generate", "Result Backend::do_generate"), (22, "do_generate", "Result LlamaBackend::do_generate"), (23, "do_generate", "Result UnrelatedThing::do_generate"), ], [ (20, 21, CALL_SOURCE_DOXYGEN_SQLITE, CALL_MATCH_EXACT), (20, 22, CALL_SOURCE_AST, CALL_MATCH_FUZZY), (20, 23, CALL_SOURCE_AST, CALL_MATCH_FUZZY), ], reimplements=[(22, 21)], )
→

When

  1. prune_dominated_fuzzy_edges(conn)
  2. survivors = _rows(conn)
→

Then

  1. ✓ prune_dominated_fuzzy_edges(conn) equals 1
  2. ✓ survivors contains (20, 22, CALL_SOURCE_AST)
  3. ✓ survivors does not contain (20, 23, CALL_SOURCE_AST)

tests/test_dominated_edges.py:227 · its file's page

What it checks (3)

  1. assert prune_dominated_fuzzy_edges(conn) == 1 observes prune_dominated_fuzzy_edges
  2. assert (20, 22, CALL_SOURCE_AST) in survivors, "virtual override lost its only edge" observes _rows via survivors
  3. assert (20, 23, CALL_SOURCE_AST) not in survivors observes _rows via survivors

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_virtual_override_of_the_anchor_is_kept→_index→prune_dominated_fuzzy_edges→_rows

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.

test_virtual_override_of_the_anchor_is_kept · 3 checksprune_dominated_fuzzy_edgesREQ-DDB-PIPE-009 · measuredprune_dominated_fuzzy_edges_identity_indexqualified_name_ofREQ-DDB-QUERY-003 · measured
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.