test_a_flow_declares_intent_scenario_and_example¶
Tests › tests/test_wiki_scenario.py
What this test is for
Why it exists
The three keys are read as written; a scenario may be a block or a list.
Given
config, problems = _load( tmp_path, " - entry: dossier\n" " intent: Everything the index knows about one name.\n" " scenario: |\n" " Given an index of this repository\n" " When an agent asks dossier about derive_flow\n" " Then the reply carries its body, callers and callees\n" " example:\n" ' input: dossier(subject="derive_flow")\n' ' output: "file: clew/wiki/flow.py"\n', )(spec,) = config.flows
When
- —
Then
- ✓ problems equals []
- ✓ spec.intent equals "Everything the index knows about one name."
- ✓ spec.scenario[0] equals "Given an index of this repository"
- ✓ len(spec.scenario) equals 3
- ✓ spec.example equals ('dossier(subject="derive_flow")', "file: clew/wiki/flow.py")
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 · 37 of 400 steps
… 6 steps between
… 343 later steps
tests/test_wiki_scenario.py:26 · its file's page
What it checks (4)
assert problems == [], problemsnot attributedassert spec.intent == "Everything the index knows about one name."not attributedassert spec.scenario[0] == "Given an index of this repository" and len(spec.scenario) == 3not attributedassert spec.example == ('dossier(subject="derive_flow")', "file: clew/wiki/flow.py")not attributed
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_flow_declares_intent_scenario_and_example→_loadWhat 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-GUARD-012 measured
- REQ-DDB-WIKI-054 inferred