test_two_namesakes_keep_their_own_slices_on_the_page¶
Tests › tests/test_wiki_slice_identity.py
What this test is for
Why it exists
One page, two definitions, each with its own flows listed under its file.
Given
page = lambda name: SimpleNamespace(name=name, title=f"Flow {name}", steps=3, flow=None)ctx = { "slices": { "tests/test_a.py::test_x": [(page("alpha"), Slice())], "tests/test_b.py::test_x": [(page("beta"), Slice())], } }
2 more
defs = [SimpleNamespace(file="tests/test_a.py"), SimpleNamespace(file="tests/test_b.py")]html = _exercises("test_x", ctx, defs)
When
- —
Then
- ✓ html.index("tests/test_a.py") < html.index("Flow alpha") < html.index("tests/test_b.py") holds
- ✓ html.index("tests/test_b.py") is less than html.index("Flow beta")
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.
Build this wiki from the index · 5 of 400 steps
… 332 earlier steps
… 59 later steps
tests/test_wiki_slice_identity.py:75 · its file's page
What it checks (2)
assert html.index("tests/test_a.py") < html.index("Flow alpha") < html.index("tests/test_b.py")observes_exercisesviahtmlassert html.index("tests/test_b.py") < html.index("Flow beta")observes_exercisesviahtml
Where the product reaches it
build_wiki→_build_site→test_pages→_exercises(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-WIKI-041 measured