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

Method reset_mock

Lib/unittest/mock.py:2238–2248  ·  view source on GitHub ↗
(self, /, *args, return_value: bool = False, **kwargs)

Source from the content-addressed store, hash-verified

2236 self._mock_set_magics()
2237
2238 def reset_mock(self, /, *args, return_value: bool = False, **kwargs):
2239 if (
2240 return_value
2241 and self._mock_name
2242 and _is_magic(self._mock_name)
2243 ):
2244 # Don't reset return values for magic methods,
2245 # otherwise `m.__str__` will start
2246 # to return `MagicMock` instances, instead of `str` instances.
2247 return_value = False
2248 super().reset_mock(*args, return_value=return_value, **kwargs)
2249
2250
2251class MagicProxy(Base):

Calls 2

_is_magicFunction · 0.85
superClass · 0.85