asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix).

This commit is contained in:
Guido van Rossum 2013-11-13 15:50:08 -08:00
parent be3c2fea35
commit 2bcae708d8
3 changed files with 60 additions and 42 deletions

View file

@ -1311,7 +1311,9 @@ else:
class UnixEventLoopTestsMixin(EventLoopTestsMixin):
def setUp(self):
super().setUp()
events.set_child_watcher(unix_events.SafeChildWatcher(self.loop))
watcher = unix_events.SafeChildWatcher()
watcher.attach_loop(self.loop)
events.set_child_watcher(watcher)
def tearDown(self):
events.set_child_watcher(None)