mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-19 07:54:33 +01:00
Cover the silent autolog branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWZHWP4KZ6x5TcXDBFC
This commit is contained in:
parent
098ed29ec7
commit
1c2fb2e451
@ -2,7 +2,7 @@ name: diet_guard_app
|
||||
description: "Companion phone app for diet_guard: log meals on the go."
|
||||
publish_to: 'none'
|
||||
|
||||
version: 1.0.174+1
|
||||
version: 1.0.175+1
|
||||
|
||||
environment:
|
||||
sdk: ^3.12.2
|
||||
|
||||
@ -156,6 +156,13 @@ class TestAutologBeforeLock:
|
||||
assert autolog_due_delivery([].append) == 0
|
||||
fetch.assert_not_called()
|
||||
|
||||
def test_nothing_new_to_log_stays_silent(self) -> None:
|
||||
"""Dishes already logged: zero written, no report line."""
|
||||
self._go((DISHES, None))
|
||||
lines = self._go((DISHES, None))
|
||||
assert self.written == 0
|
||||
assert lines == []
|
||||
|
||||
def test_logging_error_is_swallowed(self) -> None:
|
||||
"""Even a disk error falls back to the lock instead of crashing the gate."""
|
||||
lines: list[str] = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user