test_identity_is_scope_qualified¶
Tests › tests/test_locks.py
What this test is for
Why it exists
`mutex_` recurs across many classes on a C++ codebase. Name-only keying would report unrelated classes as sharing a mutex — the worst error available here, since a fabricated shared lock is indistinguishable from real synchronization.
Given
scopes = {s[1]: s[2] for s in _sites(_CPP)}
When
- —
Then
- ✓ scopes["mutex_"] equals "class:Widget"
- ✓ scopes["rw_"] equals "class:Widget"
tests/test_locks.py:88 · its file's page
What it checks (2)
assert scopes["mutex_"] == "class:Widget"observes_sitesviascopesassert scopes["rw_"] == "class:Widget"observes_sitesviascopes
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_identity_is_scope_qualified→_sitesWhat 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-003 measured
- REQ-DDB-SCHEMA-011 measured