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

Show on the map →

Called by none

Calls none

Checks

  • assert d is not None and d.kind == "thread"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-QUERY-001measured
REQ-DDB-QUERY-003measured
REQ-DDB-QUERY-004measured
REQ-DDB-QUERY-010measured
REQ-DDB-QUERY-011measured
REQ-DDB-QUERY-012measured
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
lines 75–75db, repo = builtlines 76–76d = dossier(db, "HealthMonitor::monitor_loop", kind="thread", repo_root=repo)lines 77–77assert d is not None and d.kind == "thread"

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

Show on the map →

Called by none

Calls none

Checks

  • 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)

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-INDEX-004measured
REQ-DDB-PIPE-003measured
REQ-DDB-PIPE-011measured
REQ-DDB-QUERY-001measured
REQ-DDB-QUERY-002measured
REQ-DDB-QUERY-003measured
REQ-DDB-QUERY-004measured
REQ-DDB-QUERY-006measured
REQ-DDB-QUERY-009measured
REQ-DDB-QUERY-010measured
REQ-DDB-QUERY-012measured
REQ-DDB-QUERY-013measured
REQ-DDB-SCHEMA-011measured
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)

Activity · 6 steps
lines 65–65db, repo = builtlines 66–66d = dossier(db, "HealthMonitor::monitor_loop", repo_root=repo)lines 67–67assert d is not Nonelines 68–68assert d.kind == "function"lines 69–69assert "thread" in d.alsolines 70–70assert any("beats" in line for line in d.function.body.lines)