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

Method copy

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

Source from the content-addressed store, hash-verified

1376
1377
1378 def copy(self):
1379 patcher = _patch(
1380 self.getter, self.attribute, self.new, self.spec,
1381 self.create, self.spec_set,
1382 self.autospec, self.new_callable, self.kwargs
1383 )
1384 patcher.attribute_name = self.attribute_name
1385 patcher.additional_patchers = [
1386 p.copy() for p in self.additional_patchers
1387 ]
1388 return patcher
1389
1390
1391 def __call__(self, func):

Callers 2

decorate_classMethod · 0.95
_patch_dictMethod · 0.45

Calls 1

_patchClass · 0.70

Tested by

no test coverage detected