summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-13 22:28:41 (GMT)
committerGitHub <noreply@github.com>2017-12-13 22:28:41 (GMT)
commitbfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1 (patch)
tree93f1204e4e844b3b40ae3e9c44eb28b147558045 /Lib/test/test_asyncio
parent11a247df88f15b51feff8a3c46005676bb29b96e (diff)
downloadcpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.zip
cpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.tar.gz
cpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.tar.bz2
bpo-32296: Unbreak tests on Windows (#4850)
Diffstat (limited to 'Lib/test/test_asyncio')
-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 144921a..45a8bb8 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()