8000 Issue #24763: Fix asyncio test on Windows (fix reverted change) · python/cpython@9632ea2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9632ea2

Browse files
committed
Issue #24763: Fix asyncio test on Windows (fix reverted change)
See also issue #24835
1 parent 054d3cd commit 9632ea2

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
< 62A5 td data-grid-cell-id="diff-3a12ea0e8988b2edcb96962049a9cca2db1ee02db133cd99493ccc87a81d08e2-420-420-2" data-line-anchor="diff-3a12ea0e8988b2edcb96962049a9cca2db1ee02db133cd99493ccc87a81d08e2R420" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">+
if sys.platform == 'win32':
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
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)
0