test_ast_rows_are_left_alone

Tests › tests/test_pydocs.py

passed Passed in the packaged run.

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

  1. db = tmp_path / "x.db"
  2. conn = sqlite3.connect(db)
3 more
  1. 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)" )
  2. conn.execute("INSERT INTO memberdef VALUES (1, 'f', 1, 1, 3, '', '', 'ast')")
  3. conn.execute("INSERT INTO memberdef VALUES (2, 'g', 1, 1, 9, '', '', 'doxygen')")
→

When

  1. _enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1])
  2. _enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2])
→

Then

  1. ✓ _enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1]) equals 0
  2. ✓ _enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2]) equals 1
  3. ✓ Path(db).exists() holds

tests/test_pydocs.py:115 · its file's page

What it checks (3)

  1. assert _enrich_one(conn, "function", 1, 3, "f", "Sum.", "", True, [1]) == 0 observes _enrich_one
  2. assert _enrich_one(conn, "function", 1, 9, "g", "Sum.", "", True, [2]) == 1 observes _enrich_one
  3. assert 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_one

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_ast_rows_are_left_alone · 3 checks_enrich_onestrip_xmlREQ-DDB-QUERY-003 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-013catalogunknown
Also reaches 1 requirement

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