test_served_selector_contract.py¶
tests/test_served_selector_contract.py
The served instruction told the model to pass a value the code rejects.
test_a_signature_cannot_select_an_identity
None test_served_selector_contract.test_a_signature_cannot_select_an_identity()
Passing a signature where a qualified name is required must select nothing.
tests/test_served_selector_contract.py:63
Checks
assert qualified_name_of(_NAME, _DEFINITION) == _QUALIFIEDassert matching_identity(_NAME, cands, _QUALIFIED), "the qualified name must select the row"assert not matching_identity(_NAME, cands, _DEFINITION), ("a signature now selects an identity, so the premise of this file no longer holds" )
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-QUERY-003 | measured | test_a_signature_cannot_select_an_identity → qualified_name_of |
| REQ-DDB-QUERY-010 | measured | test_a_signature_cannot_select_an_identity → matching_identity |
Source · 18 lines
def test_a_signature_cannot_select_an_identity() -> None:
"""THE PREMISE OF EVERY OTHER TEST HERE, asserted rather than assumed. If this starts failing
because the accessor grew a signature fallback, then the served wording was never a defect and
the rest of this file is measuring nothing — delete it rather than keeping it green.
@brief A signature selects nothing.
@return None.
@version 1
"""
cands = [(1, _DEFINITION)]
assert qualified_name_of(_NAME, _DEFINITION) == _QUALIFIED
assert matching_identity(_NAME, cands, _QUALIFIED), "the qualified name must select the row"
assert not matching_identity(_NAME, cands, _DEFINITION), (
"a signature now selects an identity, so the premise of this file no longer holds"
)