summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_asyncio/test_events.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 144921ad0e..45a8bb86f6 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -2735,13 +2735,16 @@ class GetEventLoopTestsMixin:
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()