test_unclaimed_aliases_are_named_and_claimed_ones_are_not

Tests › tests/test_diagnostics.py

passed Passed in the packaged run.

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

  1. doxyfile = tmp_path / "Doxyfile"
  2. doxyfile.write_text(ALIASES_TEXT, encoding="utf-8")
  3. db = _corpus(tmp_path / "clew.db", [("function", "run")])
→

When

  1. result = dg.collect(db, doxyfile, None, None, None)
→

Then

  1. ✓ set(result.unclaimed_aliases) equals {"broadcasts", "req"}
  2. ✓ result.unclaimed_aliases does not contain "emits"
  3. ✓ result.as_meta()["unclaimed_event_aliases_count"] equals "2"

tests/test_diagnostics.py:254 · its file's page

What it checks (3)

  1. assert set(result.unclaimed_aliases) == {"broadcasts", "req"} observes collect via result
  2. assert "emits" not in result.unclaimed_aliases, "a claimed verb is not a finding" observes collect via result
  3. assert result.as_meta()["unclaimed_event_aliases_count"] == "2" observes collect via result

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_unclaimed_aliases_are_named_and_claimed_ones_are_not→_corpus→collect

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_unclaimed_aliases_are_named_and_claimed_ones_are_not · 3 checkscollectresolve_shared_key_patternsREQ-DDB-CONFIG-006 · measuredcollectREQ-DDB-CONFIG-007 · measuredcollectload_thread_patternsREQ-DDB-SCHEMA-001 · measuredcollectresolve_shared_key_patternsREQ-DDB-SCHEMA-005 · measuredcollectload_lock_patternsREQ-DDB-SCHEMA-011 · measuredcollectload_lock_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 7 requirements

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