summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
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