summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-08-21 11:18:04 (GMT)
committerGitHub <noreply@github.com>2023-08-21 11:18:04 (GMT)
commit639ffd5aa0fcc1a66cb99ce2afa31a93e7e5f7b4 (patch)
treed62aa48e43b8c2c92e6141ac1f3f3d657fee7e8b
parent9cd15cab772e9e6073b3074ab6ef85db83a0e40c (diff)
downloadcpython-639ffd5aa0fcc1a66cb99ce2afa31a93e7e5f7b4.zip
cpython-639ffd5aa0fcc1a66cb99ce2afa31a93e7e5f7b4.tar.gz
cpython-639ffd5aa0fcc1a66cb99ce2afa31a93e7e5f7b4.tar.bz2
[3.12] gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) (#108196)
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) (cherry picked from commit 014a5b71e7538926ae1c03c8c5ea13c96e741be3) Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
-rw-r--r--Lib/test/test_asyncio/test_runners.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_runners.py b/Lib/test/test_asyncio/test_runners.py
index 811cf8b..0a1ad07 100644
--- a/Lib/test/test_asyncio/test_runners.py
+++ b/Lib/test/test_asyncio/test_runners.py
@@ -101,11 +101,14 @@ class RunTests(BaseTest):
loop = asyncio.get_event_loop()
self.assertIs(loop.get_debug(), expected)
- asyncio.run(main(False))
+ asyncio.run(main(False), debug=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)
+ with mock.patch('asyncio.coroutines._is_debug_mode', lambda: False):
+ asyncio.run(main(True), debug=True)
+ asyncio.run(main(False))
def test_asyncio_run_from_running_loop(self):
async def main():