Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 054d3cd commit 9632ea2Copy full SHA for 9632ea2
1 file changed
Lib/test/test_asyncio/test_subprocess.py
@@ -417,7 +417,11 @@ def kill_running():
417
def test_popen_error(self):
418
# Issue #24763: check that the subprocess transport is closed
419
# when BaseSubprocessTransport fails
420
- with mock.patch('subprocess.Popen') as popen:
+ if sys.platform == 'win32':
421
+ target = 'asyncio.windows_utils.Popen'
422
+ else:
423
+ target = 'subprocess.Popen'
424
+ with mock.patch(target) as popen:
425
exc = ZeroDivisionError
426
popen.side_effect = exc
427
0 commit comments