We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7675d3 commit f430392Copy full SHA for f430392
1 file changed
Lib/test/test_asyncio/test_tasks.py
@@ -3682,14 +3682,14 @@ def task_factory(loop, coro):
3682
3683
def test_run_coroutine_threadsafe_and_cancel(self):
3684
async def target():
3685
- # self.loop.run_in_executor(None, _in_another_thread)
3686
thread_future = asyncio.run_coroutine_threadsafe(self.add(1, 2), self.loop)
3687
await asyncio.sleep(0)
3688
3689
thread_future.cancel()
3690
3691
3692
- self.loop.run_until_complete(target())
+ future = self.loop.run_in_executor(None, target)
+ self.loop.run_until_complete(future)
3693
self.assertEqual(0, len(self.loop._ready))
3694
3695
0 commit comments