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

Method test_unhashable_function

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

Source from the content-addressed store, hash-verified

2245 cloudpickle.dumps(obj, protocol=self.protocol)
2246
2247 def test_unhashable_function(self):
2248 d = {"a": 1}
2249 depickled_method = pickle_depickle(d.get, protocol=self.protocol)
2250 self.assertEqual(depickled_method("a"), 1)
2251 self.assertEqual(depickled_method("b"), None)
2252
2253 @unittest.skipIf(
2254 sys.version_info >= (3, 14),

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected