test_enrich_rejects_non_list_yaml

Tests › tests/test_enrichment.py

passed Passed in the packaged run.

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

  1. db = tmp_path / "clew.db"
  2. sqlite3.connect(str(db)).close()
2 more
  1. yaml_path = tmp_path / "topics.yaml"
  2. yaml_path.write_text("topic: not_a_list\ntitle: T\n", encoding="utf-8")
→

When

  1. enrich_database(db, yaml_path)
→

Then

  1. ✓ 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

test_enrich_rejects_non_list_yaml→enrich_database

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_enrich_rejects_non_list_yamlenrich_databaseREQ-DDB-PIPE-001 · measured
Also reaches 1 requirement

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