test_provenance_names_the_source¶
Tests › tests/test_preprocessor.py
What this test is for
Why it exists
Part 3's actual claim. Every one of these must be distinguishable in `build_meta`, because an index of a multi-variant codebase is an index of ONE variant and a consumer comparing two indexes needs to know which.
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"root.mkdir()
When
resolve_preprocessor(root, {})resolve_preprocessor(root, {}, ["A"])declared = resolve_preprocessor(root, {SECTION_PREPROCESSOR: {"predefined": ["A"]}})
Then
- ✓ resolve_preprocessor(root, {}).source equals SOURCE_NONE
- ✓ resolve_preprocessor(root, {}, ["A"]).source equals SOURCE_FLAG
- ✓ declared.source equals SOURCE_DECLARED
- ✓ declared.as_meta()["predefined"] equals '"A"'
tests/test_preprocessor.py:629 · its file's page
What it checks (4)
assert resolve_preprocessor(root, {}).source == SOURCE_NONEobservesresolve_preprocessorassert resolve_preprocessor(root, {}, ["A"]).source == SOURCE_FLAGobservesresolve_preprocessorassert declared.source == SOURCE_DECLAREDobservesresolve_preprocessorviadeclaredassert declared.as_meta()["predefined"] == '"A"'observesresolve_preprocessorviadeclared
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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-014 | catalog | 1 of 5: within_repo |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-004 measured