test_no_backup_is_left_when_the_file_is_created¶
Tests › tests/test_init.py
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
target = tmp_path / REPO_CONFIG_NAME
When
apply_plan(plan_merge(target, _expected_entry()))
Then
- ✓ target.is_file() holds
- ✓ 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
… 202 later steps
tests/test_init.py:523 · its file's page
What it checks (2)
assert target.is_file()not attributedassert not target.with_name(target.name + BACKUP_SUFFIX).exists()not attributed
Where the product reaches it
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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CLI-002 measured
- REQ-DDB-MCP-001 measured