Skip to content

Commit ca3910a

Browse files
BabyChrist666claude
andcommitted
fix: add coverage pragmas to _wait_for_file_growth safety paths
The timeout raise and file-not-yet-exists branch are safety nets that don't execute in normal test runs. Mark them with coverage pragmas to satisfy the 100% coverage requirement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d6c126 commit ca3910a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/client/test_stdio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ async def _wait_for_file_growth(
237237
prev_size = -1
238238

239239
while time.monotonic() < deadline:
240-
if os.path.exists(file_path):
240+
if os.path.exists(file_path): # pragma: no branch
241241
size = os.path.getsize(file_path)
242242
if size > 0 and prev_size >= 0 and size > prev_size:
243243
return # File is growing
244244
prev_size = size
245245
await anyio.sleep(poll_interval)
246246

247-
raise AssertionError(f"{description} did not start writing within {timeout}s")
247+
raise AssertionError(f"{description} did not start writing within {timeout}s") # pragma: no cover
248248

249249

250250
class TestChildProcessCleanup:

0 commit comments

Comments
 (0)