test_a_report_without_the_reach_step_keeps_its_shape¶
Tests › tests/test_impact_reach.py
What this test is for
Why it exists
No reach: the 2.0.0 object, no `tests`, `via` or unmapped keys.
Given
- —
When
entries = build_impact_report( [ChangedFunction(name="f", file_path="a.c", reqs=["REQ-A-001"])], {} )doc = json.loads(format_json(entries))
Then
- ✓ set(doc) equals {"schema_version", "entries"}
- ✓ doc["entries"][0] does not contain "tests"
- ✓ doc["entries"][0]["functions"][0] does not contain "via"
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.
`main` (clew/guard/main.py) · 4 of 357 steps
… 54 earlier steps
… 211 steps between
… 78 later steps
tests/test_impact_reach.py:148 · its file's page
What it checks (2)
assert set(doc) == {"schema_version", "entries"}observesformat_jsonviadocassert "tests" not in doc["entries"][0] and "via" not in doc["entries"][0]["functions"][0]observesformat_jsonviadoc
Where the product reaches it
main→_run→run_precommit→_write_report→format_json(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 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-009 measured
- REQ-DDB-GUARD-010 measured
- REQ-DDB-GUARD-011 measured
- REQ-DDB-GUARD-016 inferred