test_a_generated_file_says_so¶
Tests › tests/test_generated_file_subject.py
What this test is for
Why it exists
RED BEFORE THE FIX: `FileSubject` has no `generated_by`, so the one fact the rubric says an answer will get wrong is absent from the reply about that very file.
Given
- —
When
built = file_subject(generated, "library/error.c")gen = built.generated_by
Then
- ✓ built is not None
- ✓ built.generated_by is not None
- ✓ gen.kind equals "custom_command"
- ✓ gen.source_file equals "library/CMakeLists.txt"
- ✓ gen.source_line equals 134
- ✓ [c.name for c in gen.command] contains "generate_errors.pl"
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 · 1 of 400 steps
… 256 earlier steps
… 139 later steps
3 more
- Look up one name: everything the index holds about it · 1 of 226 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/test_generated_file_subject.py:89 · its file's page
What it checks (5)
assert built is not Noneobservesfile_subjectviabuiltassert built.generated_by is not None, "the file the rubric calls generated must say so"observesfile_subjectviabuiltassert gen.kind == "custom_command"not attributedassert gen.source_file == "library/CMakeLists.txt" and gen.source_line == 134, gennot attributedassert "generate_errors.pl" in [c.name for c in gen.command], gen.commandnot 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
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-QUERY-003 measured
- REQ-DDB-QUERY-004 measured