mirror of
https://github.com/python/cpython.git
synced 2024-12-15 04:44:47 +08:00
asyncio: Fix test_stdin_broken_pipe(), drain() can also raise
ConnectionResetError
This commit is contained in:
parent
d55b54d5c0
commit
ddc8c8db1c
@ -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())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user