test_repair_noop_without_attribute_rows¶
Tests › tests/test_repair_attribute.py
What this test is for
Why it exists
No attribute rows -> no-op.
Given
db = tmp_path / "d.db"conn = sqlite3.connect(str(db))
3 more
conn.executescript( "CREATE TABLE path(rowid INTEGER PRIMARY KEY, name TEXT, type INTEGER);" "CREATE TABLE memberdef(rowid INTEGER PRIMARY KEY, name TEXT, kind TEXT," " file_id INTEGER, bodyfile_id INTEGER, bodystart INTEGER, bodyend INTEGER);" "INSERT INTO path(rowid,name,type) VALUES(1,'mod.c',1);" "INSERT INTO memberdef(rowid,name,kind,file_id,bodyfile_id,bodystart,bodyend)" " VALUES(1,'ok_fn','function',1,1,2,4);" )conn.commit()conn.close()
When
repair_attribute_named_functions(db, tmp_path)
Then
- ✓ repair_attribute_named_functions(db, tmp_path) equals 0
tests/test_repair_attribute.py:90 · its file's page
What it checks (1)
assert repair_attribute_named_functions(db, tmp_path) == 0observesrepair_attribute_named_functions
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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-001 measured
- REQ-DDB-PIPE-011 inferred
- REQ-DDB-PIPE-012 inferred