]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
improve `test_tasks` to use correct idiom for starting task in asyncio (#130257)
authorKumar Aditya <kumaraditya@python.org>
Tue, 18 Feb 2025 12:08:25 +0000 (17:38 +0530)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2025 12:08:25 +0000 (12:08 +0000)
commit2e3e65380b91124267212114c7f62b85edf6e810
treed790b2511b5ac42e28cb6d9346922d5e8eefaafb
parentb93b7e566e5a4efe7f077af2083140e50bd2b08f
improve `test_tasks` to use correct idiom for starting task in asyncio (#130257)

The test should use the correct idiom for starting the task, `loop._run_once` is private API which should not be used directly, instead use `asyncio.sleep(0)` for 1 event loop cycle.
Lib/test/test_asyncio/test_tasks.py