Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 131426e

Browse files
committed
Merge 3.4 (issues python#24835, python#24763)
2 parents 89e5122 + 9632ea2 commit 131426e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,11 @@ def kill_running():
417417
def test_popen_error(self):
418418
# Issue #24763: check that the subprocess transport is closed
419419
# when BaseSubprocessTransport fails
420-
with mock.patch('subprocess.Popen') as popen:
420+
if sys.platform == 'win32':
421+
target = 'asyncio.windows_utils.Popen'
422+
else:
423+
target = 'subprocess.Popen'
424+
with mock.patch(target) as popen:
421425
exc = ZeroDivisionError
422426
popen.side_effect = exc
423427

0 commit comments

Comments
 (0)