test_search_prose_limit_and_bad_expression¶
Tests › tests/test_query.py
What this test is for
Why it exists
The limit is honoured, and an FTS5-invalid expression is retried as a literal phrase instead of surfacing a syntax error to the caller.
Verifies REQ-DDB-QUERY-002
Given
- —
When
q.search_prose(rich_db, "the OR robot OR key", limit=2)q.search_prose(rich_db, 'unbalanced " quote')
Then
- ✓ len(q.search_prose(rich_db, "the OR robot OR key", limit=2)) is at most 2
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
… 73 steps between
… 92 later steps
2 more
- `main` (scripts/export_parity.py) · 11 of 203 steps
- Look up one name: everything the index holds about it · 1 of 226 steps
tests/test_query.py:918 · its file's page
What it checks (1)
assert len(q.search_prose(rich_db, "the OR robot OR key", limit=2)) <= 2observessearch_prose
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
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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-QUERY-002 | catalog | unknown |
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-007 measured