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

Method assert_not_awaited

Lib/unittest/mock.py:2464–2471  ·  view source on GitHub ↗

Assert that the mock was never awaited.

(self)

Source from the content-addressed store, hash-verified

2462 ) from cause
2463
2464 def assert_not_awaited(self):
2465 """
2466 Assert that the mock was never awaited.
2467 """
2468 if self.await_count != 0:
2469 msg = (f"Expected {self._mock_name or 'mock'} to not have been awaited."
2470 f" Awaited {self.await_count} times.")
2471 raise AssertionError(msg)
2472
2473 def reset_mock(self, /, *args, **kwargs):
2474 """

Callers 4

test_create_autospecMethod · 0.80
test_asyncMethod · 0.80

Calls

no outgoing calls

Tested by 4

test_create_autospecMethod · 0.64
test_asyncMethod · 0.64