mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071)
* bpo-41696: Fix handling of debug mode in asyncio.run
This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run
* 📜🤖 Added by blurb_it.
Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c
)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
parent
49571c0b0e
commit
a2680058ee
3 changed files with 7 additions and 2 deletions
|
@ -87,6 +87,9 @@ class RunTests(BaseTest):
|
|||
|
||||
asyncio.run(main(False))
|
||||
asyncio.run(main(True), debug=True)
|
||||
with mock.patch('asyncio.coroutines._is_debug_mode', lambda: True):
|
||||
asyncio.run(main(True))
|
||||
asyncio.run(main(False), debug=False)
|
||||
|
||||
def test_asyncio_run_from_running_loop(self):
|
||||
async def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue