test_lookup_class_members_carry_their_documentation¶
Tests › tests/test_query.py
What this test is for
Why it exists
gh#16. `_members` selected name/kind/type/argsstring/line and NOTHING ELSE, so a struct's members came back as an index of field names with their documentation dropped — and the `///<` comments on a C or C++ config header are the whole reason that struct is being read. The class view was the only subject kind that discarded documentation: the FUNCTION view has always returned brief, detail and body.
Verifies REQ-DDB-QUERY-002
Given
- —
When
entry = q.lookup_class(_class_db(tmp_path), "demo::shape::PolygonWidget")members = {m.name: m for m in entry.members}
Then
- ✓ entry is not None
- ✓ members["redraw"].brief equals "Redraws the widget outline."
- ✓ members["redraw"].detail equals "Recomputation is deferred until the next paint."
- ✓ members["canvas_"].brief equals ""
- ✓ members["canvas_"].detail equals ""
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.
Look up one name: everything the index holds about it · 1 of 226 steps
… 17 earlier steps
… 204 later steps
2 more
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/test_query.py:1273 · its file's page
What it checks (5)
assert entry is not Noneobserveslookup_classviaentryassert members["redraw"].brief == "Redraws the widget outline."not attributedassert members["redraw"].detail == "Recomputation is deferred until the next paint."not attributedassert members["canvas_"].brief == ""not attributedassert members["canvas_"].detail == ""not 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-QUERY-002 | catalog | unknown |
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-010 measured