]> granicus.if.org Git - python/commitdiff
asyncio: Fix test_stdin_broken_pipe(), drain() can also raise
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 17 Jul 2014 12:01:14 +0000 (14:01 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 17 Jul 2014 12:01:14 +0000 (14:01 +0200)
ConnectionResetError

Lib/test/test_asyncio/test_subprocess.py

index e41cabefe859f7c1db82e65b75d103119ac71d96..d050458e7fff5eac4d800e1d3acfe20661295812 100644 (file)
@@ -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())