From 3fcfc0d1e857e8144a97643266ed7c2398a93d63 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Wed, 13 Dec 2017 16:37:55 -0500 Subject: [PATCH] bpo-32296: Unbreak tests on Windows --- Lib/test/test_asyncio/test_events.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 144921ad0ec588..45a8bb86f6328d 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2735,13 +2735,16 @@ def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop) - watcher = asyncio.SafeChildWatcher() - watcher.attach_loop(self.loop) - asyncio.set_child_watcher(watcher) + if sys.platform != 'win32': + watcher = asyncio.SafeChildWatcher() + watcher.attach_loop(self.loop) + asyncio.set_child_watcher(watcher) def tearDown(self): try: - asyncio.set_child_watcher(None) + if sys.platform != 'win32': + asyncio.set_child_watcher(None) + super().tearDown() finally: self.loop.close()