test_thread_shadow.py¶
tests/test_thread_shadow.py
A qualified name that is both a thread and a function resolves to the FUNCTION, and names the thread under `also` (T6; 2.0.0).
test_kind_thread_still_selects_the_thread_by_the_same_spelling
None test_thread_shadow.test_kind_thread_still_selects_the_thread_by_the_same_spelling(built)
The thread stays reachable: the preference is a default, not a removal.
tests/test_thread_shadow.py:73
Checks
assert d is not None and d.kind == "thread"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-QUERY-001 | measured | |
| REQ-DDB-QUERY-003 | measured | |
| REQ-DDB-QUERY-004 | measured | |
| REQ-DDB-QUERY-010 | measured | |
| REQ-DDB-QUERY-011 | measured | |
| REQ-DDB-QUERY-012 | measured |
Source · 5 lines
def test_kind_thread_still_selects_the_thread_by_the_same_spelling(built) -> None:
"""@brief The thread stays reachable: the preference is a default, not a removal."""
db, repo = built
d = dossier(db, "HealthMonitor::monitor_loop", kind="thread", repo_root=repo)
assert d is not None and d.kind == "thread"1 more lines, not shown
Activity · 3 steps
test_the_qualified_name_resolves_to_the_function_with_the_thread_under_also
None test_thread_shadow.test_the_qualified_name_resolves_to_the_function_with_the_thread_under_also(built)
Function first, with its body; `thread` named, not served.
tests/test_thread_shadow.py:63
Checks
assert d is not Noneassert d.kind == "function"assert "thread" in d.alsoassert any("beats" in line for line in d.function.body.lines)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-INDEX-004 | measured | |
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | |
| REQ-DDB-QUERY-002 | measured | |
| REQ-DDB-QUERY-003 | measured | |
| REQ-DDB-QUERY-004 | measured | |
| REQ-DDB-QUERY-006 | measured | |
| REQ-DDB-QUERY-009 | measured | |
| REQ-DDB-QUERY-010 | measured | |
| REQ-DDB-QUERY-012 | measured | |
| REQ-DDB-QUERY-013 | measured | |
| REQ-DDB-SCHEMA-011 | measured |
Source · 10 lines
def test_the_qualified_name_resolves_to_the_function_with_the_thread_under_also(built) -> None:
"""@brief Function first, with its body; `thread` named, not served."""
db, repo = built
d = dossier(db, "HealthMonitor::monitor_loop", repo_root=repo)
assert d is not None
assert d.kind == "function"
assert "thread" in d.also
assert any("beats" in line for line in d.function.body.lines)