Skip to content

tester: cover OnlineFitnessLog.clear() both sub-cases#144

Open
bugsyhewitt wants to merge 1 commit into
mainfrom
test/online-fitness-clear-coverage
Open

tester: cover OnlineFitnessLog.clear() both sub-cases#144
bugsyhewitt wants to merge 1 commit into
mainfrom
test/online-fitness-clear-coverage

Conversation

@bugsyhewitt

Copy link
Copy Markdown
Owner

What

Adds two tests to TestOnlineFitnessLog covering the previously unexercised clear() method:

  • A-004 test_clear_deletes_existing_log: records an entry (creating the file), calls clear(), asserts the file is gone and read() returns [].
  • A-005 test_clear_is_noop_when_file_does_not_exist: calls clear() on a never-written log and asserts no FileNotFoundError is raised (exercises the if self._path.exists(): guard on line 41).

No production code changes. Both behaviors were already correct; the tests lock in the guarantee.

Ship-gate evidence

vitest:  95 passed | 1 skipped (96 files)  — 1629 passed | 40 skipped
pytest:  1127 passed, 125 skipped          — +2 from this PR (were 1125)
ruff:    All checks passed

Branch: test/online-fitness-clear-coverage — tester cycle 2026-07-03T19:31:53Z.

@bugsyhewitt bugsyhewitt added the tester opened by a Tester agent label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tester opened by a Tester agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant