test_unknown_enums_are_elided_but_only_the_named_ones¶
Tests › tests/test_wire.py
What this test is for
Why it exists
A REGRESSION TEST for an inversion this module itself introduced.
Given
row = { "name": "publish", "dispatch_mode": "unknown", "edge_kind": "unknown", "lock_kind": "unknown", "crosses_thread": False, }
When
out = wire.one(_Envelope(callers=[]))pruned = wire.rows([_KeyRow(**row)])[0]determined = wire.rows([_KeyRow(**{**row, "dispatch_mode": "keyed"})])[0]
Then
- ✓ out is not None
- ✓ pruned does not contain "dispatch_mode"
- ✓ pruned does not contain "edge_kind"
- ✓ pruned["lock_kind"] equals "unknown"
- ✓ pruned["crosses_thread"] is False
- ✓ determined["dispatch_mode"] equals "keyed"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Look up one name: everything the index holds about it · 7 of 226 steps
… 27 earlier steps
… 188 later steps
2 more
- clew — `main` (clew/cli.py) · 7 of 400 steps
- `main` (scripts/export_parity.py) · 7 of 203 steps
tests/test_wire.py:129 · its file's page
What it checks (6)
assert out is not Noneobservesoneviaoutassert "dispatch_mode" not in pruned, "an undetermined dispatch_mode must not ship"observesrowsviaprunedassert "edge_kind" not in pruned, "an undetermined edge_kind must not ship"observesrowsviaprunedassert pruned["lock_kind"] == "unknown", ( "lock_kind='unknown' is a measurement — a lock of undetermined type is not no lock" )observesrowsviaprunedassert pruned["crosses_thread"] is False, "a measured non-crossing must still ship"observesrowsviaprunedassert determined["dispatch_mode"] == "keyed"observesrowsviadetermined
Where the product reaches it
dossier→subject_payload→_flatten_subject→one(flow)
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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured