test_search_prose_single_token_miss_reports_no_widening

Tests › tests/test_query.py

passed Passed in the packaged run.

What this test is for

Why it exists

A one-word query has no conjunction to relax, so a miss is a genuine absence and must NOT be dressed up as a widened search. This is the case where "definitive" is the honest word — the distinction the emptiness note depends on.

Verifies REQ-DDB-QUERY-002

Given

  1. —
→

When

  1. result = q.search_prose_graded(rich_db, "zzqqxwv")
→

Then

  1. ✓ result.hits equals []
  2. ✓ result.widened is False
  3. ✓ result.tokens equals ("zzqqxwv",)

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

… 73 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesother filesopt (line 1012)optopt (line 1014)optmain294. corpus_payload → _prose_corpus294_prose_corpus295. _prose_corpus → search_prose_graded295search_prose_graded296. search_prose_graded → _query_tokens296_query_tokens▶ test enters297. search_prose_graded → connect297connect298. search_prose_graded → table_exists298table_exists299. search_prose_graded → _fts_match299_fts_match300. search_prose_graded → _fts_match300_fts_match301. search_prose_graded → strip_xml301strip_xml302. search_prose_graded → list302list303. search_prose_graded → member_doc_rows303member_doc_rows304. member_doc_rows → table_exists304table_exists305. member_doc_rows → has_columns305has_columns306. search_prose_graded → _collapse306_collapse307. _prose_corpus → prose_emptiness307prose_emptiness

… 93 later steps

2 more

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

What it checks (3)

  1. assert result.hits == [] observes search_prose_graded via result
  2. assert result.widened is False observes search_prose_graded via result
  3. assert result.tokens == ("zzqqxwv",) observes search_prose_graded via result

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → _prose_corpus → search_prose_graded (flow)

Call flow

test_search_prose_single_token_miss_reports_no_widening→search_prose_graded

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_search_prose_single_token_miss_reports_no_widening · 3 checkssearch_prose_gradedREQ-DDB-QUERY-001 · measuredsearch_prose_gradedtable_existsREQ-DDB-QUERY-003 · measuredsearch_prose_gradedmember_doc_rowsREQ-DDB-QUERY-007 · 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.