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

Method test_itemgetter

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected