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

Method test_task_repr_wait_for

Lib/test/test_asyncio/test_tasks.py:426–439  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

424 self.loop.run_until_complete(t)
425
426 def test_task_repr_wait_for(self):
427 self.loop.set_debug(False)
428
429 async def wait_for(fut):
430 return await fut
431
432 fut = self.new_future(self.loop)
433 task = self.new_task(self.loop, wait_for(fut))
434 test_utils.run_briefly(self.loop)
435 self.assertRegex(repr(task),
436 '<Task .* wait_for=%s>' % re.escape(repr(fut)))
437
438 fut.set_result(None)
439 self.loop.run_until_complete(task)
440
441 def test_task_basics(self):
442

Callers

nothing calls this directly

Calls 9

new_futureMethod · 0.95
new_taskMethod · 0.95
wait_forFunction · 0.85
run_brieflyMethod · 0.80
assertRegexMethod · 0.80
escapeMethod · 0.80
set_debugMethod · 0.45
set_resultMethod · 0.45
run_until_completeMethod · 0.45

Tested by

no test coverage detected