test_python_checks_are_pinned_direct_via_variable_or_not¶
Tests › tests/test_wiki_checkpins.py
What this test is for
Why it exists
`ast`: direct, via `r`, not attributed, direct (the innermost known call).
Verifies REQ-DDB-WIKI-044
Given
- —
When
pins = pin_checks(_PY.splitlines(), "tests/test_store.py", {"save", "clean"})
Then
- ✓ _kinds(pins) equals [ ("direct", "save"), ("via variable", "save"), ("not attributed", None), ("direct", "clean"), ]
- ✓ pins[1].variable equals "r"
- ✓ pins[0].statement equals "assert save(2) == 2"
tests/test_wiki_checkpins.py:46 · its file's page
What it checks (3)
assert _kinds(pins) == [ ("direct", "save"), ("via variable", "save"), ("not attributed", None), ("direct", "clean"), ]observes_kindsassert pins[1].variable == "r"observespin_checksviapinsassert pins[0].statement == "assert save(2) == 2"observespin_checksviapins
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-WIKI-044 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-043 measured