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):