(Merge 3.4) asyncio: Fix test_stdin_broken_pipe(), drain() can also raise

ConnectionResetError
This commit is contained in:
Victor Stinner 2014-07-17 14:01:39 +02:00
commit dc2539f957
1 changed files with 2 additions and 2 deletions

View 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())