[Python-checkins] cpython (3.4): asyncio: Fix test_stdin_broken_pipe(), drain() can also raise

victor.stinner python-checkins at python.org
Thu Jul 17 14:01:55 CEST 2014


http://hg.python.org/cpython/rev/ffbc1f65823d
changeset:   91717:ffbc1f65823d
branch:      3.4
parent:      91715:cb327c64cffb
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Jul 17 14:01:14 2014 +0200
summary:
  asyncio: Fix test_stdin_broken_pipe(), drain() can also raise
ConnectionResetError

files:
  Lib/test/test_asyncio/test_subprocess.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -130,9 +130,9 @@
     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())
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list