MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / test_itemgetter

Method test_itemgetter

tests/cloudpickle_test.py:155–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153 assert wr() is None, "'del'-ed my_object has not been collected"
154
155 def test_itemgetter(self):
156 d = range(10)
157 getter = itemgetter(1)
158
159 getter2 = pickle_depickle(getter, protocol=self.protocol)
160 self.assertEqual(getter(d), getter2(d))
161
162 getter = itemgetter(0, 3)
163 getter2 = pickle_depickle(getter, protocol=self.protocol)
164 self.assertEqual(getter(d), getter2(d))
165
166 def test_attrgetter(self):
167 class C:

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected