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

Method _unpatch_dict

Lib/unittest/mock.py:1969–1979  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1967
1968
1969 def _unpatch_dict(self):
1970 in_dict = self.in_dict
1971 original = self._original
1972
1973 _clear_dict(in_dict)
1974
1975 try:
1976 in_dict.update(original)
1977 except AttributeError:
1978 for key in original:
1979 in_dict[key] = original[key]
1980
1981
1982 def __exit__(self, *args):

Callers 2

_innerMethod · 0.95
__exit__Method · 0.95

Calls 2

_clear_dictFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected