test_non_fields_are_not_harvested¶
Tests › tests/test_python_class_fields.py
What this test is for
Why it exists
THE THREE WAYS TO OVER-COLLECT, each of which would put a row in `memberdef` under a class that does not declare it:
Given
tree, src = _parse(tmp_path)
When
names = {f.name for f in harvest_python_class_fields(tree, src)}
Then
- ✓ names does not contain "local_annotated"
- ✓ names does not contain "module_local"
- ✓ names does not contain "CONST"
- ✓ names does not contain "method"
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.
clew — `main` (clew/cli.py) · 7 of 400 steps
… 70 earlier steps
… 313 later steps
tests/test_python_class_fields.py:118 · its file's page
What it checks (4)
assert "local_annotated" not in names, "a method-local annotation is not a class field"observesharvest_python_class_fieldsvianamesassert "module_local" not in names, "a function-local annotation is not a class field"observesharvest_python_class_fieldsvianamesassert "CONST" not in names, "an unannotated assignment is doxygen's to emit, not ours"observesharvest_python_class_fieldsvianamesassert "method" not in names, "a method is a function, recovered by the function walk"observesharvest_python_class_fieldsvianames
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-INDEX-004 measured
- REQ-DDB-PIPE-011 measured