summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 00bd408..7b9839c 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)