test_ast_rows_are_left_alone¶
Tests › tests/test_pydocs.py
What this test is for
Why it exists
An 'ast' row says it has no documentation; filling one in would make that false.
Verifies REQ-DDB-PIPE-013
Given
db = tmp_path / "x.db"conn = sqlite3.connect(db)
3 more
conn.execute( "CREATE TABLE memberdef (rowid INTEGER PRIMARY KEY, name TEXT, file_id INT, " "bodyfile_id INT, line INT, briefdescription TEXT, detaileddescription TEXT, dg_source TEXT)" )conn.execute("INSERT INTO memberdef VALUES (1, 'f', 1, 1, 3, '', '', 'ast')")conn.execute("INSERT INTO memberdef VALUES (2, 'g', 1, 1, 9, '', '', 'doxygen')")
When
_enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1])_enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2])
Then
- ✓ _enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1]) equals 0
- ✓ _enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2]) equals 1
- ✓ Path(db).exists() holds
tests/test_pydocs.py:115 · its file's page
What it checks (3)
assert _enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1]) == 0observes_enrich_oneassert _enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2]) == 1observes_enrich_oneassert Path(db).exists()not 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_ast_rows_are_left_alone→_enrich_oneWhat 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-013 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-003 measured