test_a_recorded_statement_can_be_withdrawn

Tests › tests/test_tiers.py

passed Passed in the packaged run.

What this test is for

Why it exists

Three states: absent inherits, EMPTY withdraws, non-empty replaces.

Given

  1. db = tmp_path / "clew.db"
→

When

  1. _stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=["%mystyle%"]), {}))
  2. withdrawn = _recorded_entry_patterns(argparse.Namespace(entry_patterns=[]), db)
  3. list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values)
2 more
  1. _entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {})
  2. replaced = _recorded_entry_patterns(argparse.Namespace(entry_patterns=["%other%"]), db)
→

Then

  1. ✓ withdrawn equals []
  2. ✓ list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values) equals DEFAULT_ENTRY_PATTERNS
  3. ✓ replaced equals ["%other%"]

tests/test_tiers.py:460 · its file's page

What it checks (3)

  1. assert withdrawn == [] observes _recorded_entry_patterns via withdrawn
  2. assert list(_entry_patterns(argparse.Namespace(entry_patterns=withdrawn), {}).values) == ( DEFAULT_ENTRY_PATTERNS ) observes list
  3. assert replaced == ["%other%"] observes _recorded_entry_patterns via replaced

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → list (flow)

Call flow

test_a_recorded_statement_can_be_withdrawn→_stamp→_entry_patterns→_recorded_entry_patterns→list

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_a_recorded_statement_can_be_withdrawn · 3 checks_entry_patternsstring_listREQ-DDB-CONFIG-001 · measured_stampwrite_build_signatureREQ-DDB-CONFIG-006 · measured_stampwrite_build_signatureREQ-DDB-CONFIG-007 · measured_recorded_entry_patternsmeta_sectionREQ-DDB-MCP-001 · inferred_stampwrite_build_signatureREQ-DDB-PIPE-005 · measured
Also reaches 5 requirements

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