Skip to content

Commit 7601a52

Browse files
Theodor N. EngøyTheodor N. Engøy
authored andcommitted
test: satisfy branch coverage for polling helper
1 parent 68be276 commit 7601a52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/client/test_stdio.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@ async def test_basic_child_process_cleanup(self):
275275
parent_marker = f.name
276276

277277
try:
278+
# Before starting any processes, the file should not grow. This also
279+
# exercises the timeout/loop paths in _wait_for_file_growth for branch
280+
# coverage.
281+
initial_size = os.path.getsize(marker_file)
282+
size_no_growth = await self._wait_for_file_growth(marker_file, initial_size, timeout_seconds=0.15)
283+
assert size_no_growth == initial_size
284+
278285
# Parent script that spawns a child process
279286
parent_script = textwrap.dedent(
280287
f"""

0 commit comments

Comments
 (0)