test_no_backup_is_left_when_the_file_is_created

Tests › tests/test_init.py

passed Passed in the packaged run.

What this test is for

Why it exists

A stray `.bak` next to a file that never existed is misleading rather than protective — it invites the reader to believe something was overwritten.

Given

  1. target = tmp_path / REPO_CONFIG_NAME
→

When

  1. apply_plan(plan_merge(target, _expected_entry()))
→

Then

  1. ✓ target.is_file() holds
  2. ✓ target.with_name(target.name + BACKUP_SUFFIX).exists() is false

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

clew — `main` (clew/cli.py) · 4 of 400 steps

… 190 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyother filesother filesother filesother filestry (line 683)trymain191. config_path → global_config_path191global_config_path192. _register → plan_merge192plan_merge193. plan_merge → load_document193load_document▶ test enters194–196. plan_merge → _classify194_classify +2 more197–198. _register → _execute197_execute +1 more

… 202 later steps

tests/test_init.py:523 · its file's page

What it checks (2)

  1. assert target.is_file() not attributed
  2. assert not target.with_name(target.name + BACKUP_SUFFIX).exists() not attributed

Where the product reaches it

  • main → propose_main → _emit → apply_plan (flow)
  • main → init_main → _register → plan_merge (flow)

Call flow

test_no_backup_is_left_when_the_file_is_created→apply_plan→plan_merge→_expected_entry

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_no_backup_is_left_when_the_file_is_created · 2 checksapply_planREQ-DDB-CLI-002 · measuredplan_mergeREQ-DDB-MCP-001 · measured
Also reaches 2 requirements

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