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

Method copy

Lib/test/test_operator.py:674–678  ·  view source on GitHub ↗
(self, obj, proto)

Source from the content-addressed store, hash-verified

672@support.thread_unsafe("swaps global operator module")
673class OperatorPickleTestCase:
674 def copy(self, obj, proto):
675 with support.swap_item(sys.modules, 'operator', self.module):
676 pickled = pickle.dumps(obj, proto)
677 with support.swap_item(sys.modules, 'operator', self.module2):
678 return pickle.loads(pickled)
679
680 def test_attrgetter(self):
681 attrgetter = self.module.attrgetter

Callers 3

test_attrgetterMethod · 0.95
test_itemgetterMethod · 0.95
test_methodcallerMethod · 0.95

Calls 2

dumpsMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected