summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-31 23:36:28 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-07-31 23:36:28 +0200
commitd27d938675ec9eaf7c7e4d6ea1c65767611b5425 (patch)
treebbf8103926360004866657d963b58fd9febec107
parent354b6e50bb23b8801b6d5636231f0662b5bfdecc (diff)
parenta0a28b076a537c11b63a9fd79b05d27ea9cb5bde (diff)
downloadcpython-git-d27d938675ec9eaf7c7e4d6ea1c65767611b5425.tar.gz
Merge 3.5 (asyncio tests)
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index d138c263c1..38f0ceeb1f 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -417,7 +417,11 @@ class SubprocessMixin:
def test_popen_error(self):
# Issue #24763: check that the subprocess transport is closed
# when BaseSubprocessTransport fails
- with mock.patch('subprocess.Popen') as popen:
+ if sys.platform == 'win32':
+ target = 'asyncio.windows_utils.Popen'
+ else:
+ target = 'subprocess.Popen'
+ with mock.patch(target) as popen:
exc = ZeroDivisionError
popen.side_effect = exc