test_thread_of_qualified_match_respects_identifier_boundaries

Tests › tests/test_query.py

passed Passed in the packaged run.

What this test is for

Why it exists

`CoLinkOwner::rx_loop` merely CONTAINS `LinkOwner::rx_loop`; a substring match would silently attribute the wrong thread.

Verifies REQ-DDB-QUERY-002

Given

  1. db = tmp_path / "threads.db"
  2. _thread_db(db)
→

When

  1. q.thread_of(db, "LinkOwner::rx_loop")
  2. q.thread_of(db, "CoLinkOwner::rx_loop")
→

Then

  1. ✓ [t.name for t in q.thread_of(db, "LinkOwner::rx_loop")] equals ["LinkOwner::rx_loop"]
  2. ✓ [t.name for t in q.thread_of(db, "CoLinkOwner::rx_loop")] equals ["CoLinkOwner::rx_loop"]

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

… 215 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyloop (line 1576)loopmain216. _memberdef_corpora → _expansion_sql216_expansion_sql217. _expansion_sql → has_columns217has_columns218. has_columns → table_exists218table_exists219. _memberdef_corpora → _memberdef_candidates219_memberdef_candidates220. _memberdef_candidates → table_exists220table_exists

… 145 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyloop ×2 (line 944)loop ×2main366. thread_roster → has_columns366has_columns367. thread_roster → _thread_columns367_thread_columns368. _thread_columns → has_columns368has_columns▶ test enters369–370. _thread_columns → has_columns369has_columns ×2371. thread_roster → _build_thread371_build_thread372. _build_thread → name_of372name_of▶ test enters373. _build_thread → table_exists373table_exists374. _build_thread → _spawn_attribution374_spawn_attribution375. _spawn_attribution → has_columns375has_columns376. thread_roster → _thread_origins376_thread_origins

… 24 later steps

2 more

tests/test_query.py:833 · its file's page

What it checks (2)

  1. assert [t.name for t in q.thread_of(db, "LinkOwner::rx_loop")] == ["LinkOwner::rx_loop"] observes thread_of
  2. assert [t.name for t in q.thread_of(db, "CoLinkOwner::rx_loop")] == ["CoLinkOwner::rx_loop"] observes thread_of

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

test_thread_of_qualified_match_respects_identifier_boundaries→_thread_db→thread_of

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.

test_thread_of_qualified_match_respects_identifier_boundaries · 2 checksthread_ofREQ-DDB-QUERY-001 · measuredthread_ofrowids_for_nameREQ-DDB-QUERY-003 · measuredthread_ofthreads_for_rowidsREQ-DDB-QUERY-004 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-QUERY-002catalogunknown
Also reaches 3 requirements

Its run touches their code; that is reach, not proof.