test_enrich_rejects_non_list_yaml¶
Tests › tests/test_enrichment.py
What this test is for
Why it exists
The contract requires a top-level YAML list; a mapping (or any non-list) must fail loudly via `sys.exit(1)` rather than silently produce an empty or malformed table.
Given
db = tmp_path / "clew.db"sqlite3.connect(str(db)).close()
2 more
yaml_path = tmp_path / "topics.yaml"yaml_path.write_text("topic: not_a_list\ntitle: T\n", encoding="utf-8")
When
enrich_database(db, yaml_path)
Then
- ✓ raises SystemExit
tests/test_enrichment.py:139 · its file's page
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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-001 measured