test_a_declared_vocabulary_is_reported_and_reclassifies

Tests › tests/test_diagnostics.py

passed Passed in the packaged run.

What this test is for

Why it exists

The loop gh#332 closes: an operator declares `event_tags`, and the reply has to say whether the declaration ARRIVED. A count alone cannot — it moves for several reasons.

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, {"broadcasts": "producer"})
  2. meta = result.as_meta()
→

Then

  1. ✓ meta["event_vocabulary_source"] equals dg.SOURCE_DECLARED
  2. ✓ meta["event_vocabulary_size"] equals "1"
  3. ✓ result.unclaimed_aliases does not contain "broadcasts"
  4. ✓ result.unclaimed_aliases contains "emits"

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

What it checks (4)

  1. assert meta["event_vocabulary_source"] == dg.SOURCE_DECLARED not attributed
  2. assert meta["event_vocabulary_size"] == "1" not attributed
  3. assert "broadcasts" not in result.unclaimed_aliases, "the declared verb is claimed" observes collect via result
  4. assert "emits" in result.unclaimed_aliases, "a declaration REPLACES the built-in verbs" 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_a_declared_vocabulary_is_reported_and_reclassifies→_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_a_declared_vocabulary_is_reported_and_reclassifies · 4 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.