8000 [3.11] gh-107895: Fix test_asyncio.test_runners when run it in CPytho… · python/cpython@d4c66bd · GitHub
[go: up one dir, main page]

Skip to content

Commit d4c66bd

Browse files
[3.11] gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) (GH-108197)
(cherry picked from commit 014a5b7) Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
1 parent 4be05aa commit d4c66bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_asyncio/test_runners.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ async def main(expected):
102102
loop = asyncio.get_event_loop()
103103
self.assertIs(loop.get_debug(), expected)
104104

105-
asyncio.run(main(False))
105+
asyncio.run(main(False), debug=False)
106106
asyncio.run(main(True), debug=True)
107107
with mock.patch('asyncio.coroutines._is_debug_mode', lambda: True):
108108
asyncio.run(main(True))
109109
asyncio.run(main(False), debug=False)
110+
with mock.patch('asyncio.coroutines._is_debug_mode', lambda: False):
111+
asyncio.run(main(True), debug=True)
112+
asyncio.run(main(False))
110113

111114
def test_asyncio_run_from_running_loop(self):
112115
async def main():

0 commit comments

Comments
 (0)
0