aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index de2e658bca6..591b48b88a2 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2272,10 +2272,8 @@ class BaseTaskTests:
self.assertEqual(self.all_tasks(loop=self.loop), {task})
- asyncio._set_event_loop(None)
-
# execute the task so it waits for future
- self.loop._run_once()
+ self.loop.run_until_complete(asyncio.sleep(0))
self.assertEqual(len(self.loop._ready), 0)
coro = None