]> granicus.if.org Git - python/commitdiff
bpo-32296: Unbreak tests on Windows (#4850)
authorYury Selivanov <yury@magic.io>
Wed, 13 Dec 2017 22:28:41 +0000 (17:28 -0500)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2017 22:28:41 +0000 (17:28 -0500)
Lib/test/test_asyncio/test_events.py

index 144921ad0ec588445cfd152a74a0fea490d6ecb8..45a8bb86f6328df2d52989d6a793fa647ebe1fc5 100644 (file)
@@ -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()