From 2bcae708d8775f40a0c9b18eb28cb60b54f6cdc3 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 13 Nov 2013 15:50:08 -0800 Subject: asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix). --- Lib/test/test_asyncio/test_events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '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 00bd4085c1..7b9839ce99 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -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) -- cgit v1.2.1