test_a_recorded_statement_can_be_withdrawn¶
Tests › tests/test_tiers.py
What this test is for
Why it exists
Three states: absent inherits, EMPTY withdraws, non-empty replaces.
Given
db = tmp_path / "clew.db"
When
_stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=["%mystyle%"]), {}))withdrawn = _recorded_entry_patterns(argparse.Namespace(entry_patterns=[]), db)list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values)
2 more
_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {})replaced = _recorded_entry_patterns(argparse.Namespace(entry_patterns=["%other%"]), db)
Then
- ✓ withdrawn equals []
- ✓ list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values) equals DEFAULT_ENTRY_PATTERNS
- ✓ replaced equals ["%other%"]
tests/test_tiers.py:460 · its file's page
What it checks (3)
assert withdrawn == []observes_recorded_entry_patternsviawithdrawnassert list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values) == ( DEFAULT_ENTRY_PATTERNS )observeslistassert replaced == ["%other%"]observes_recorded_entry_patternsviareplaced
Where the product reaches it
dossier→subject_payload→_flatten_subject→list(flow)
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.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-MCP-001 inferred
- REQ-DDB-PIPE-005 measured