MCPcopy Index your code
hub / github.com/python/cpython / test_asyncio_run_debug

Method test_asyncio_run_debug

Lib/test/test_asyncio/test_runners.py:100–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 asyncio.run(o)
99
100 def test_asyncio_run_debug(self):
101 async def main(expected):
102 loop = asyncio.get_event_loop()
103 self.assertIs(loop.get_debug(), expected)
104
105 asyncio.run(main(False), debug=False)
106 asyncio.run(main(True), debug=True)
107 with mock.patch('asyncio.coroutines._is_debug_mode', lambda: True):
108 asyncio.run(main(True))
109 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))
113
114 def test_asyncio_run_from_running_loop(self):
115 async def main():

Callers

nothing calls this directly

Calls 2

mainFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected