test_a_refusal_the_receiver_CONTRADICTS_is_not_credited

Tests › tests/test_unresolved_inbound.py

passed Passed in the packaged run.

What this test is for

Why it exists

gh#18, unblocked by gh#21. `IndexCache.close` reported 403 unresolved inbound sites because it is the only indexed `close` in a Python repository, so every `conn.close()`, `f.close()` and `proc.close()` in the tree credited it — a number about how often a bare name appears in member-call position, which is the name-as-evidence fallacy the attribution rule was written to avoid. I checked the callee side and never checked whether the site said anything about the receiver.

Given

  1. unresolved: list[list[int]] = []
→

When

  1. _ast_record_call_edge( 1, "close", {"close": [620]}, [], [], SOURCE_AST_MEMBER, receiver="conn", receiver_types={"conn": {"sqlite3"}}, scope_of={620: "clew.indexcache.IndexCache"}, unresolved=unresolved, )
→

Then

  1. ✓ unresolved equals []

tests/test_unresolved_inbound.py:323 · its file's page

What it checks (1)

  1. assert unresolved == [], ( "the receiver is declared sqlite3 and the only candidate is an IndexCache method, " "so this call site is evidence AGAINST that callee, not for it" ) 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_a_refusal_the_receiver_CONTRADICTS_is_not_credited→_ast_record_call_edge

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_a_refusal_the_receiver_CONTRADICTS_is_not_credited · 1 checks_ast_record_call_edge_narrow_by_receiver_one_classallREQ-DDB-WIKI-054 · inferred
Also reaches 1 requirement

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