test_licence_lines_are_dropped_from_a_real_header¶
Tests › tests/test_hash_file_docs.py
What this test is for
Why it exists
The Perl header above carries BOTH — two prose lines and then copyright. The block is accepted for the prose and the licence lines are not published, because a reader searching the prose corpus for a concept should not match every file that shares a licence.
Given
- —
When
doc = extract_file_doc("scripts/generate_errors.pl", PERL)
Then
- ✓ doc contains "Generate error.c"
- ✓ doc does not contain "SPDX"
- ✓ doc does not contain "Copyright"
tests/test_hash_file_docs.py:138 · its file's page
What it checks (3)
assert "Generate error.c" in docobservesextract_file_docviadocassert "SPDX" not in doc, docobservesextract_file_docviadocassert "Copyright" not in doc, docobservesextract_file_docviadoc
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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-008 measured