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

Method test_async

Lib/test/test_unittest/testmock/testasync.py:204–206  ·  view source on GitHub ↗
(mock_method)

Source from the content-addressed store, hash-verified

202 def test_is_AsyncMock_patch(self):
203 @patch(async_foo_name, autospec=True)
204 def test_async(mock_method):
205 self.assertIsInstance(mock_method.async_method, AsyncMock)
206 self.assertIsInstance(mock_method, MagicMock)
207
208 @patch(async_foo_name, autospec=True)
209 def test_normal_method(mock_method):

Callers

nothing calls this directly

Calls 12

patchFunction · 0.90
assertIsInstanceMethod · 0.80
assertTrueMethod · 0.80
assertIsNoneMethod · 0.80
assert_not_awaitedMethod · 0.80
assert_awaited_onceMethod · 0.80
assert_awaited_withMethod · 0.80
assert_awaitedMethod · 0.80
callFunction · 0.50
assertEqualMethod · 0.45
reset_mockMethod · 0.45

Tested by

no test coverage detected