summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoon Hwan 김준환 <xncbf12@gmail.com>2023-08-21 07:55:09 (GMT)
committerGitHub <noreply@github.com>2023-08-21 07:55:09 (GMT)
commit014a5b71e7538926ae1c03c8c5ea13c96e741be3 (patch)
treebc7f0da4e1ac244dfdf0255ec3295b80eb9a4d0d
parent8f3d09bf5d16b508fece5420a22abe6f0c1f00b7 (diff)
downloadcpython-014a5b71e7538926ae1c03c8c5ea13c96e741be3.zip
cpython-014a5b71e7538926ae1c03c8c5ea13c96e741be3.tar.gz
cpython-014a5b71e7538926ae1c03c8c5ea13c96e741be3.tar.bz2
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168)
-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 b1eb6f4..1eb5641 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():