summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-05-30 02:00:31 (GMT)
committerGitHub <noreply@github.com>2018-05-30 02:00:31 (GMT)
commitbb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8 (patch)
treef5f6c3dca3e98850adf7aac9a8fe88ba50042640 /Lib/test/test_asyncio/test_subprocess.py
parentad74d50517c069359578014bb32e660828d68332 (diff)
downloadcpython-bb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8.zip
cpython-bb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8.tar.gz
cpython-bb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8.tar.bz2
Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)
This reverts commit ad74d50517c069359578014bb32e660828d68332. Turns out it's not a good fix -- Travis has just crashed on this test.
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index 0158337..235813a 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -218,10 +218,8 @@ class SubprocessMixin:
# 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)
@@ -230,7 +228,7 @@ class SubprocessMixin:
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()