summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-09 22:22:11 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-09 22:22:11 (GMT)
commit31978d9ff4c91f91fa26ec7909ee3b26e1b08e67 (patch)
tree43a0fc1d4cdb1d9dfa07dcc1b70ab7a2a10742a9
parentdfa95c9a8f2772d1e8e54aa5aa14c91d4971964f (diff)
parent131426ebe34f7781c3ab1e213ed4f521bf7cc2e0 (diff)
downloadcpython-31978d9ff4c91f91fa26ec7909ee3b26e1b08e67.zip
cpython-31978d9ff4c91f91fa26ec7909ee3b26e1b08e67.tar.gz
cpython-31978d9ff4c91f91fa26ec7909ee3b26e1b08e67.tar.bz2
Merge 3.5 (issues #24835, #24763)
-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 d138c26..38f0cee 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