test_repair_noop_without_attribute_rows

Tests › tests/test_repair_attribute.py

passed Passed in the packaged run.

What this test is for

Why it exists

No attribute rows -> no-op.

Given

  1. db = tmp_path / "d.db"
  2. conn = sqlite3.connect(str(db))
3 more
  1. 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);" )
  2. conn.commit()
  3. conn.close()
→

When

  1. repair_attribute_named_functions(db, tmp_path)
→

Then

  1. ✓ repair_attribute_named_functions(db, tmp_path) equals 0

tests/test_repair_attribute.py:90 · its file's page

What it checks (1)

  1. assert repair_attribute_named_functions(db, tmp_path) == 0 observes repair_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

test_repair_noop_without_attribute_rows→repair_attribute_named_functions

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_repair_noop_without_attribute_rows · 1 checksrepair_attribute_named_functionsREQ-DDB-INDEX-001 · measuredrepair_attribute_named_functions_real_function_name_at_ast_parse_one_file_parseable_fileREQ-DDB-PIPE-011 · inferredrepair_attribute_named_functions… 4 calls …has_languageREQ-DDB-PIPE-012 · inferred
Also reaches 3 requirements

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