test_unclaimed_aliases_are_named_and_claimed_ones_are_not¶
Tests › tests/test_diagnostics.py
What this test is for
Why it exists
BOTH HALVES, because a diagnostic that lists every alias would be noise and one that lists none would be the silence being fixed. `emits` is a built-in producer verb and must NOT appear; `broadcasts` and `req` are unclaimed and must.
Given
doxyfile = tmp_path / "Doxyfile"doxyfile.write_text(ALIASES_TEXT, encoding="utf-8")db = _corpus(tmp_path / "clew.db", [("function", "run")])
When
result = dg.collect(db, doxyfile, None, None, None)
Then
- ✓ set(result.unclaimed_aliases) equals {"broadcasts", "req"}
- ✓ result.unclaimed_aliases does not contain "emits"
- ✓ result.as_meta()["unclaimed_event_aliases_count"] equals "2"
tests/test_diagnostics.py:254 · its file's page
What it checks (3)
assert set(result.unclaimed_aliases) == {"broadcasts", "req"}observescollectviaresultassert "emits" not in result.unclaimed_aliases, "a claimed verb is not a finding"observescollectviaresultassert result.as_meta()["unclaimed_event_aliases_count"] == "2"observescollectviaresult
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
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.
Also reaches 7 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-QUERY-011 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-005 measured
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured