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

Skip to content

Commit 639ffd5

Browse files
[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 014a5b7) Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
1 parent 9cd15ca commit 639ffd5

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
@@ -101,11 +101,14 @@ async def main(expected):
101101
loop = asyncio.get_event_loop()
102102
self.assertIs(loop.get_debug(), expected)
103103

104-
asyncio.run(main(False))
104+
asyncio.run(main(False), debug=False)
105105
asyncio.run(main(True), debug=True)
106106
with mock.patch('asyncio.coroutines._is_debug_mode', lambda: True):
107107
asyncio.run(main(True))
108108
asyncio.run(main(False), debug=False)
109+
with mock.patch('asyncio.coroutines._is_debug_mode', lambda: False):
110+
asyncio.run(main(True), debug=True)
111+
asyncio.run(main(False))
109112

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

0 commit comments

Comments
 (0)
0