8000 gh-107895: Fix test_asyncio.test_runners when run it in CPython's "de… · python/cpython@014a5b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 014a5b7

Browse files
authored
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168)
8000
1 parent 8f3d09b commit 014a5b7

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