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

Method bar

Lib/test/test_asyncio/test_tasks.py:314–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 await bar()
313
314 async def bar():
315 # test get_stack()
316 f = T.get_stack(limit=1)
317 try:
318 self.assertEqual(f[0].f_code.co_name, 'foo')
319 finally:
320 f = None
321
322 # test print_stack()
323 file = io.StringIO()
324 T.print_stack(limit=1, file=file)
325 file.seek(0)
326 tb = file.read()
327 self.assertRegex(tb, r'foo\(\) running')
328
329 async def runner():
330 nonlocal T

Callers

nothing calls this directly

Calls 6

print_stackMethod · 0.80
assertRegexMethod · 0.80
get_stackMethod · 0.45
assertEqualMethod · 0.45
seekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected