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

Method test_task_print_stack

Lib/test/test_asyncio/test_pep492.py:173–188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

171 self.assertEqual(data, 'spam')
172
173 def test_task_print_stack(self):
174 T = None
175
176 async def foo():
177 f = T.get_stack(limit=1)
178 try:
179 self.assertEqual(f[0].f_code.co_name, 'foo')
180 finally:
181 f = None
182
183 async def runner():
184 nonlocal T
185 T = asyncio.ensure_future(foo(), loop=self.loop)
186 await T
187
188 self.loop.run_until_complete(runner())
189
190 def test_double_await(self):
191 async def afunc():

Callers

nothing calls this directly

Calls 2

runnerFunction · 0.85
run_until_completeMethod · 0.45

Tested by

no test coverage detected