diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2020-09-03 04:54:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 04:54:46 (GMT) |
commit | 0770ad948cb6d9f7f6c4002efd83e27c27069808 (patch) | |
tree | b3b40d1fa497c21ed6475f83279713dd7722e3b2 /Lib/test/test_asyncio | |
parent | 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 (diff) | |
download | cpython-0770ad948cb6d9f7f6c4002efd83e27c27069808.zip cpython-0770ad948cb6d9f7f6c4002efd83e27c27069808.tar.gz cpython-0770ad948cb6d9f7f6c4002efd83e27c27069808.tar.bz2 |
bpo-41696: Fix handling of debug mode in asyncio.run (#22069)
* 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>
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_runners.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_runners.py b/Lib/test/test_asyncio/test_runners.py index 3b58dde..b9ae02d 100644 --- a/Lib/test/test_asyncio/test_runners.py +++ b/Lib/test/test_asyncio/test_runners.py @@ -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(): |