summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-10-05 21:02:07 (GMT)
committerYury Selivanov <yury@magic.io>2016-10-05 21:02:07 (GMT)
commitfb9c5186b6d4fcc6108db4678fb6cd815de496ce (patch)
tree69f5e7c09eabd4319a670e0a411f2d7e3eb2f9ab /Lib/test/test_asyncio/test_subprocess.py
parent3c946599d0828b7c4f5fe166d8a5a5cc1a2aa502 (diff)
parent67ea61818ef9b435bd47270e0a87e768ebdeeae6 (diff)
downloadcpython-fb9c5186b6d4fcc6108db4678fb6cd815de496ce.zip
cpython-fb9c5186b6d4fcc6108db4678fb6cd815de496ce.tar.gz
cpython-fb9c5186b6d4fcc6108db4678fb6cd815de496ce.tar.bz2
Merge 3.6 (issue #28368)
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index 58f7253..1531023 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -433,6 +433,13 @@ class SubprocessMixin:
# the transport was not notified yet
self.assertFalse(killed)
+ # Unlike SafeChildWatcher, FastChildWatcher does not pop the
+ # callbacks if waitpid() is called elsewhere. Let's clear them
+ # manually to avoid a warning when the watcher is detached.
+ if sys.platform != 'win32' and \
+ isinstance(self, SubprocessFastWatcherTests):
+ asyncio.get_child_watcher()._callbacks.clear()
+
def test_popen_error(self):
# Issue #24763: check that the subprocess transport is closed
# when BaseSubprocessTransport fails