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

Function reset_mock

Lib/unittest/mock.py:251–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 def assert_any_call(*args, **kwargs):
250 return mock.assert_any_call(*args, **kwargs)
251 def reset_mock():
252 funcopy.method_calls = _CallList()
253 funcopy.mock_calls = _CallList()
254 mock.reset_mock()
255 ret = funcopy.return_value
256 if _is_instance_mock(ret) and not ret is mock:
257 ret.reset_mock()
258
259 funcopy.called = False
260 funcopy.call_count = 0

Callers

nothing calls this directly

Calls 3

_CallListClass · 0.85
_is_instance_mockFunction · 0.85
reset_mockMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…