test_search_prose_punctuation_only_tokens_never_reach_fts5

Tests › tests/test_query.py

passed Passed in the packaged run.

What this test is for

Why it exists

A token of pure punctuation tokenizes to an EMPTY phrase, and an empty phrase is an FTS5 syntax error rather than a harmless no-op — so it must be dropped before the OR is composed, not after.

Verifies REQ-DDB-QUERY-002

Given

  1. —
→

When

  1. result = q.search_prose_graded(rich_db, "chime _ ' -")
→

Then

  1. ✓ result.tokens equals ("chime",)
  2. ✓ result.hits holds

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) · 11 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_emptiness308. prose_emptiness → has_prose_corpus308has_prose_corpus

… 92 later steps

2 more

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

What it checks (2)

  1. assert result.tokens == ("chime",) observes search_prose_graded via result
  2. assert result.hits 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_punctuation_only_tokens_never_reach_fts5→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_punctuation_only_tokens_never_reach_fts5 · 2 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.