test_enrich_optional_field_defaults¶
Tests › tests/test_enrichment.py
What this test is for
Why it exists
A minimal entry (only the required scalar fields) inserts cleanly: the absent list fields default to `[]` and difficulty to 1.
Given
minimal = "- topic: t\n title: T\n summary: S\n"db = _enrich(tmp_path, minimal)
3 more
conn = sqlite3.connect(str(db))row = conn.execute( "SELECT key_files, key_concepts, prerequisite_topics, difficulty FROM architecture_topics" ).fetchone()conn.close()
When
- —
Then
- ✓ json.loads(row[0]) equals []
- ✓ json.loads(row[1]) equals []
- ✓ json.loads(row[2]) equals []
- ✓ row[3] equals 1
tests/test_enrichment.py:96 · its file's page
What it checks (4)
assert json.loads(row[0]) == []not attributedassert json.loads(row[1]) == []not attributedassert json.loads(row[2]) == []not attributedassert row[3] == 1not attributed
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_optional_field_defaults→_enrichWhat 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