test_thread_apis_empty_on_threadless_firmware

Tests › tests/test_query.py

passed Passed in the packaged run.

What this test is for

Why it exists

The fixture spawns no threads → an empty roster and an empty thread_of (the populated cases are covered by the unit tier).

Verifies REQ-DDB-QUERY-002

Given

  1. —
→

When

  1. roster = q.thread_roster(rich_db)
  2. q.thread_of(rich_db, "sensor_poll")
→

Then

  1. ✓ roster.threads equals ()
  2. ✓ roster.rows equals 0
  3. ✓ roster.origin.total equals 0
  4. ✓ roster.row_meaning does not contain "predates the thread layer"
  5. ✓ q.thread_of(rich_db, "sensor_poll") 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.

clew — `main` (clew/cli.py) · 9 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

… 141 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesother filesloop ×2 (line 944)loop ×2main362. corpus_payload → one362one363. corpus_payload → thread_roster363thread_roster364. thread_roster → connect364connect▶ test enters365. thread_roster → table_exists365table_exists366. thread_roster → has_columns366has_columns367. thread_roster → _thread_columns367_thread_columns368. _thread_columns → has_columns368has_columns369–370. _thread_columns → has_columns369has_columns ×2371. thread_roster → _build_thread371_build_thread372. _build_thread → name_of372name_of373. _build_thread → table_exists373table_exists374. _build_thread → _spawn_attribution374_spawn_attribution375. _spawn_attribution → has_columns375has_columns376–377. thread_roster → _thread_origins376_thread_origins +1 more378–379. corpus_payload → _config_found_on_the_wire378_config_found_on_the_wire +1 more

… 21 later steps

2 more

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

What it checks (5)

  1. assert roster.threads == () observes thread_roster via roster
  2. assert roster.rows == 0 observes thread_roster via roster
  3. assert roster.origin.total == 0 observes thread_roster via roster
  4. assert "predates the thread layer" not in roster.row_meaning observes thread_roster via roster
  5. assert q.thread_of(rich_db, "sensor_poll") == [] observes thread_of

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → thread_roster (flow)

Call flow

test_thread_apis_empty_on_threadless_firmware→thread_roster→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_apis_empty_on_threadless_firmware · 5 checksthread_rosterREQ-DDB-QUERY-001 · measuredthread_rostertable_existsREQ-DDB-QUERY-003 · measuredthread_ofthreads_for_rowidsREQ-DDB-QUERY-004 · measuredthread_rosterREQ-DDB-QUERY-011 · measured

Requirements it verifies (1)

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

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