mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
asyncio: Sync with upstream (compat module)
This commit is contained in:
parent
996083d6e6
commit
2a8911c0b7
7 changed files with 14 additions and 16 deletions
|
@ -417,11 +417,7 @@ class SubprocessMixin:
|
|||
def test_popen_error(self):
|
||||
# Issue #24763: check that the subprocess transport is closed
|
||||
# when BaseSubprocessTransport fails
|
||||
if sys.platform == 'win32':
|
||||
target = 'asyncio.windows_utils.Popen'
|
||||
else:
|
||||
target = 'subprocess.Popen'
|
||||
with mock.patch(target) as popen:
|
||||
with mock.patch('subprocess.Popen') as popen:
|
||||
exc = ZeroDivisionError
|
||||
popen.side_effect = exc
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue