10000 gh-107895: Fix test_asyncio.test_runners when run it in CPython's "de… · miss-islington/cpython@2fe7da8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fe7da8

Browse files
xncbfmiss-islington
authored andcommitted
pythongh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (pythonGH-108168)
(cherry picked from co 10133 mmit 014a5b7) Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
1 parent 4be05aa commit 2fe7da8

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