test_a_receiver_with_SEVERAL_owning_classes_is_still_credited¶
Tests › tests/test_unresolved_inbound.py
What this test is for
Why it exists
The other control, and the shape of it is worth stating because writing it revealed a bug. A receiver whose class MATCHES a single candidate does not refuse at all — it RESOLVES, so there is no refusal to credit and no assertion to make. The only way a credited refusal can have a matching receiver is when the receiver denotes SEVERAL classes that each own the name, which `_one_class` refuses to pin.
Given
unresolved: list[list[int]] = []
When
_ast_record_call_edge( 1, "close", {"close": [620, 700]}, [], [], SOURCE_AST_MEMBER, receiver="handle", receiver_types={"handle": {"a.Cache", "b.Store"}}, scope_of={620: "a.Cache", 700: "b.Store"}, unresolved=unresolved, )
Then
- ✓ unresolved equals [[620, 700]]
tests/test_unresolved_inbound.py:384 · its file's page
What it checks (1)
assert unresolved == [[620, 700]], ( "two owning classes is a genuine ambiguity, not contrary evidence" )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_receiver_with_SEVERAL_owning_classes_is_still_credited→_ast_record_call_edgeWhat 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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-054 inferred