summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-17 21:55:36 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-02-17 21:55:36 (GMT)
commit7cbb78cd979b492d4e2371aa0a69e9f6df59c7cd (patch)
tree012d63c001f134f0fa0214c3d0856ef435696891 /Lib/test/test_asyncio/test_subprocess.py
parent8391b728e9a28e8a28ba987425c9e2f25206fe3c (diff)
parent4088ad9dcef0d7bbe26dc4a2527d4220ac558f53 (diff)
downloadcpython-7cbb78cd979b492d4e2371aa0a69e9f6df59c7cd.zip
cpython-7cbb78cd979b492d4e2371aa0a69e9f6df59c7cd.tar.gz
cpython-7cbb78cd979b492d4e2371aa0a69e9f6df59c7cd.tar.bz2
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index de0b08a..92bf1b4 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -355,11 +355,19 @@ class SubprocessMixin:
create = self.loop.subprocess_exec(asyncio.SubprocessProtocol,
*PROGRAM_BLOCKED)
transport, protocol = yield from create
+
+ kill_called = False
+ def kill():
+ nonlocal kill_called
+ kill_called = True
+ orig_kill()
+
proc = transport.get_extra_info('subprocess')
- proc.kill = mock.Mock()
+ orig_kill = proc.kill
+ proc.kill = kill
returncode = transport.get_returncode()
transport.close()
- return (returncode, proc.kill.called)
+ return (returncode, kill_called)
# Ignore "Close running child process: kill ..." log
with test_utils.disable_logger():