Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ddc8c8d

Browse files
committed
asyncio: Fix test_stdin_broken_pipe(), drain() can also raise
ConnectionResetError
1 parent d55b54d commit ddc8c8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def prepare_broken_pipe_test(self):
130130
def test_stdin_broken_pipe(self):
131131
proc, large_data = self.prepare_broken_pipe_test()
132132

133-
# drain() must raise BrokenPipeError
133+
# drain() must raise BrokenPipeError or ConnectionResetError
134134
proc.stdin.write(large_data)
135-
self.assertRaises(BrokenPipeError,
135+
self.assertRaises((BrokenPipeError, ConnectionResetError),
136136
self.loop.run_until_complete, proc.stdin.drain())
137137
self.loop.run_until_complete(proc.wait())
138138

0 commit comments

Comments
 (0)