[Python-checkins] bpo-32296: Unbreak tests on Windows (#4850)
Yury Selivanov
webhook-mailer at python.org
Wed Dec 13 17:28:44 EST 2017
https://github.com/python/cpython/commit/bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1
commit: bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1
branch: master
author: Yury Selivanov <yury at magic.io>
committer: GitHub <noreply at github.com>
date: 2017年12月13日T17:28:41-05:00
summary:
bpo-32296: Unbreak tests on Windows (#4850)
files:
M Lib/test/test_asyncio/test_events.py
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 144921ad0ec..45a8bb86f63 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()
More information about the Python-checkins
mailing list