@@ -14,7 +14,7 @@ async def test_stdio_server_exits_on_eof():
1414 """Server should exit gracefully when stdin is closed (EOF)."""
1515 # Create a closed stdin (simulating parent death)
1616 closed_stdin = StringIO () # Empty, immediate EOF
17-
17+
1818 # This should complete without hanging
1919 with anyio .move_on_after (5 ): # 5 second timeout
2020 async with stdio_server () as (read_stream , write_stream ):
@@ -23,20 +23,20 @@ async def test_stdio_server_exits_on_eof():
2323 await read_stream .receive ()
2424 except anyio .EndOfStream :
2525 pass # Expected - stream closed
26-
26+
2727 # If we get here without timeout, test passes
2828
2929
30- @pytest .mark .anyio
30+ @pytest .mark .anyio
3131async def test_stdio_server_parent_death_simulation ():
3232 """Simulate parent process death by closing stdin."""
3333 # Create pipes to simulate stdin/stdout
3434 stdin_reader , stdin_writer = anyio .create_memory_object_stream [str ](10 )
35-
35+
3636 async with stdio_server () as (read_stream , write_stream ):
3737 # Close the input to simulate parent death
3838 await stdin_writer .aclose ()
39-
39+
4040 # Server should detect EOF and exit gracefully
4141 with pytest .raises (anyio .EndOfStream ):
4242 await asyncio .wait_for (read_stream .receive (), timeout = 5.0 )
0 commit comments