diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-07-31 21:36:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-07-31 21:36:00 (GMT) |
commit | 9a82bd45cde8d41092b2ee8294acb9bd45a53807 (patch) | |
tree | a62599e3c2c34bacc4464eb39aca1637933b47e4 /Lib | |
parent | 2080dc97a7d629384a1dfbad9003f3cbd9011911 (diff) | |
download | cpython-9a82bd45cde8d41092b2ee8294acb9bd45a53807.zip cpython-9a82bd45cde8d41092b2ee8294acb9bd45a53807.tar.gz cpython-9a82bd45cde8d41092b2ee8294acb9bd45a53807.tar.bz2 |
Issue #24763: Fix asyncio test on Windows
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_asyncio/test_subprocess.py | 6 |
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 |