test_running_the_recovery_twice_inserts_nothing_the_second_time

Tests › tests/test_python_class_fields.py

passed Passed in the packaged run.

What this test is for

Why it exists

A refresh folds the whole cached payload set, so this stage sees every field on every build. Without the dedup reading back what it just wrote, each refresh would add another row per attribute and a class's member list would grow with the repository's build history.

Given

  1. conn = _index()
  2. harvested = [(1, {"class_fields": [["name", "Config", "str", 7]]})]
→

When

  1. _recover_class_fields_into(conn, harvested)
→

Then

  1. ✓ _recover_class_fields_into(conn, harvested) equals 1
  2. ✓ _recover_class_fields_into(conn, harvested) equals 0
  3. ✓ len(_members(conn, "a::Config")) equals 1

tests/test_python_class_fields.py:259 · its file's page

What it checks (3)

  1. assert _recover_class_fields_into(conn, harvested) == 1 observes _recover_class_fields_into
  2. assert _recover_class_fields_into(conn, harvested) == 0 observes _recover_class_fields_into
  3. assert len(_members(conn, "a::Config")) == 1 observes _members

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_running_the_recovery_twice_inserts_nothing_the_second_time→_index→_recover_class_fields_into→_members

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_running_the_recovery_twice_inserts_nothing_the_second_time · 3 checks_recover_class_fields_intoREQ-DDB-INDEX-004 · measured_recover_class_fields_intoallREQ-DDB-WIKI-054 · inferred
Also reaches 2 requirements

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