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

Method test_isawaitable

Lib/test/test_unittest/testmock/testasync.py:180–185  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

178 self.assertTrue(inspect.iscoroutinefunction(mock))
179
180 def test_isawaitable(self):
181 mock = AsyncMock()
182 m = mock()
183 self.assertTrue(inspect.isawaitable(m))
184 run(m)
185 self.assertIn('assert_awaited', dir(mock))
186
187 def test_iscoroutinefunction_normal_function(self):
188 def foo(): pass

Callers

nothing calls this directly

Calls 4

AsyncMockClass · 0.90
runFunction · 0.90
assertTrueMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected