From: Victor Stinner Date: Thu, 17 Jul 2014 12:01:14 +0000 (+0200) Subject: asyncio: Fix test_stdin_broken_pipe(), drain() can also raise X-Git-Tag: v3.4.2rc1~210 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddc8c8db1cd50d3b86cffbb1070ab32e3a14bbae;p=thirdparty%2FPython%2Fcpython.git asyncio: Fix test_stdin_broken_pipe(), drain() can also raise ConnectionResetError --- diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index e41cabefe859..d050458e7fff 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -130,9 +130,9 @@ class SubprocessMixin: def test_stdin_broken_pipe(self): proc, large_data = self.prepare_broken_pipe_test() - # drain() must raise BrokenPipeError + # drain() must raise BrokenPipeError or ConnectionResetError proc.stdin.write(large_data) - self.assertRaises(BrokenPipeError, + self.assertRaises((BrokenPipeError, ConnectionResetError), self.loop.run_until_complete, proc.stdin.drain()) self.loop.run_until_complete(proc.wait())