From 23112b18806877028756829ba58728bca5874600 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Sun, 23 Jun 2024 04:59:25 +0000 Subject: [PATCH] add test --- Lib/test/test_asyncio/test_subprocess.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 211b2bed0732df..23987c70ca7b63 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -875,6 +875,14 @@ def setUp(self): self.loop = policy.new_event_loop() self.set_event_loop(self.loop) + def test_watcher_implementation(self): + loop = self.loop + watcher = loop._watcher + if unix_events.can_use_pidfd(): + self.assertIsInstance(watcher, unix_events._PidfdChildWatcher) + else: + self.assertIsInstance(watcher, unix_events._ThreadedChildWatcher) + class SubprocessThreadedWatcherTests(SubprocessWatcherMixin, test_utils.TestCase):