Skip to content

Commit

Permalink
Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (G…
Browse files Browse the repository at this point in the history
…H-7235)

This reverts commit ad74d50.

Turns out it's not a good fix -- Travis has just crashed on this test.
  • Loading branch information
1st1 committed May 30, 2018
1 parent ad74d50 commit bb9474f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Lib/test/test_asyncio/test_subprocess.py
Expand Up @@ -218,10 +218,8 @@ def prepare_broken_pipe_test(self):

# the program ends before the stdin can be feeded
create = asyncio.create_subprocess_exec(
sys.executable,
'-c', 'print("hello", flush=True)',
sys.executable, '-c', 'pass',
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
loop=self.loop)
proc = self.loop.run_until_complete(create)
return (proc, large_data)
Expand All @@ -230,7 +228,7 @@ def test_stdin_broken_pipe(self):
proc, large_data = self.prepare_broken_pipe_test()

async def write_stdin(proc, data):
await proc.stdout.readline()
await asyncio.sleep(0.5, loop=self.loop)
proc.stdin.write(data)
await proc.stdin.drain()

Expand Down

0 comments on commit bb9474f

Please sign in to comment.