MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_tp_await_2

Method test_tp_await_2

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

Source from the content-addressed store, hash-verified

2526 self.assertEqual(foo().send(None), 1)
2527
2528 def test_tp_await_2(self):
2529 # Test tp_await to __await__ mapping
2530 from _testcapi import awaitType as at
2531 future = at(iter([1]))
2532 self.assertEqual(next(future.__await__()), 1)
2533
2534 def test_tp_await_3(self):
2535 from _testcapi import awaitType as at

Callers

nothing calls this directly

Calls 5

atFunction · 0.85
iterFunction · 0.85
nextFunction · 0.85
assertEqualMethod · 0.45
__await__Method · 0.45

Tested by

no test coverage detected