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

Method test_iscoroutine

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

Source from the content-addressed store, hash-verified

109class CoroutineTests(BaseTest):
110
111 def test_iscoroutine(self):
112 async def foo(): pass
113
114 f = foo()
115 try:
116 self.assertTrue(asyncio.iscoroutine(f))
117 finally:
118 f.close() # silence warning
119
120 self.assertTrue(asyncio.iscoroutine(FakeCoro()))
121
122 def test_iscoroutine_generator(self):
123 def foo(): yield

Callers

nothing calls this directly

Calls 4

FakeCoroClass · 0.85
assertTrueMethod · 0.80
fooFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected