diff options
author | Yury Selivanov <yury@magic.io> | 2017-12-13 22:28:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 22:28:41 (GMT) |
commit | bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1 (patch) | |
tree | 93f1204e4e844b3b40ae3e9c44eb28b147558045 | |
parent | 11a247df88f15b51feff8a3c46005676bb29b96e (diff) | |
download | cpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.zip cpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.tar.gz cpython-bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1.tar.bz2 |
bpo-32296: Unbreak tests on Windows (#4850)
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 11 |
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() |