Skip to content

Commit bb9474f

Browse files
authored
Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)
This reverts commit ad74d50. Turns out it's not a good fix -- Travis has just crashed on this test.
1 parent ad74d50 commit bb9474f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎Lib/test/test_asyncio/test_subprocess.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ def prepare_broken_pipe_test(self):
218218

219219
# the program ends before the stdin can be feeded
220220
create = asyncio.create_subprocess_exec(
221-
sys.executable,
222-
'-c', 'print("hello", flush=True)',
221+
sys.executable, '-c', 'pass',
223222
stdin=subprocess.PIPE,
224-
stdout=subprocess.PIPE,
225223
loop=self.loop)
226224
proc = self.loop.run_until_complete(create)
227225
return (proc, large_data)
@@ -230,7 +228,7 @@ def test_stdin_broken_pipe(self):
230228
proc, large_data = self.prepare_broken_pipe_test()
231229

232230
async def write_stdin(proc, data):
233-
await proc.stdout.readline()
231+
await asyncio.sleep(0.5, loop=self.loop)
234232
proc.stdin.write(data)
235233
await proc.stdin.drain()
236234

0 commit comments

Comments
 (0)