test_each_assertion_is_a_diamond_failing_into_its_mode¶
Tests › tests/test_flowchart.py
What this test is for
Why it exists
Marker first; else the test's only mode; never a guess.
Given
- —
When
nodes = chart(_pins(), BODY, 10, ["FM-1"])kinds = [n.kind for n in nodes]checks = [n for n in nodes if n.kind == "check"]
3 more
steps = [n.text for n in nodes if n.kind == "step"]all("add" in s for s in steps)two = chart(_pins(), BODY, 10, ["FM-1", "FM-3"])
Then
- ✓ kinds[0] equals "start"
- ✓ kinds[-1] equals "passed"
- ✓ [c.line for c in checks] equals [12, 13]
- ✓ [c.fails_into for c in checks] equals ["FM-2", "FM-1"]
- ✓ steps holds
- ✓ all("add" in s for s in steps) holds
- ✓ [c.fails_into for c in two if c.kind == "check"] equals ["FM-2", UNASSIGNED]
tests/test_flowchart.py:41 · its file's page
What it checks (5)
assert kinds[0] == "start" and kinds[-1] == "passed"not attributedassert [c.line for c in checks] == [12, 13]not attributedassert [c.fails_into for c in checks] == ["FM-2", "FM-1"], "marker wins; else the only mode"not attributedassert steps and all("add" in s for s in steps), "a box is the function the check observes"observesallassert [c.fails_into for c in two if c.kind == "check"] == ["FM-2", UNASSIGNED]observeschartviatwo
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-043 measured
- REQ-DDB-WIKI-054 inferred