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

Method assert_not_called

Lib/unittest/mock.py:938–946  ·  view source on GitHub ↗

assert that the mock was never called.

(self)

Source from the content-addressed store, hash-verified

936 return _call
937
938 def assert_not_called(self):
939 """assert that the mock was never called.
940 """
941 if self.call_count != 0:
942 msg = ("Expected '%s' to not have been called. Called %s times.%s"
943 % (self._mock_name or 'mock',
944 self.call_count,
945 self._calls_repr()))
946 raise AssertionError(msg)
947
948 def assert_called(self):
949 """assert that the mock was called at least once

Calls 1

_calls_reprMethod · 0.95