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

Method test_tp_await_2

Lib/test/test_coroutines.py:2493–2497  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2491 self.assertEqual(foo().send(None), 1)
2492
2493 def test_tp_await_2(self):
2494 # Test tp_await to __await__ mapping
2495 from _testcapi import awaitType as at
2496 future = at(iter([1]))
2497 self.assertEqual(next(future.__await__()), 1)
2498
2499 def test_tp_await_3(self):
2500 from _testcapi import awaitType as at

Callers

nothing calls this directly

Calls 3

atFunction · 0.50
assertEqualMethod · 0.45
__await__Method · 0.45

Tested by

no test coverage detected