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

Method reset_mock

Lib/unittest/mock.py:3097–3103  ·  view source on GitHub ↗

See :func:`.Mock.reset_mock()`

(self, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

3095 self.__dict__["_mock_wait_timeout"] = timeout
3096
3097 def reset_mock(self, /, *args, **kwargs):
3098 """
3099 See :func:`.Mock.reset_mock()`
3100 """
3101 super().reset_mock(*args, **kwargs)
3102 self.__dict__["_mock_event"] = threading.Event()
3103 self.__dict__["_mock_calls_events"] = []
3104
3105 def __get_event(self, expected_args, expected_kwargs):
3106 with self._mock_calls_events_lock:

Callers

nothing calls this directly

Calls 3

superClass · 0.85
EventMethod · 0.80
reset_mockMethod · 0.45

Tested by

no test coverage detected