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

Method test_nested_lambdas

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

Source from the content-addressed store, hash-verified

265 self.assertEqual(pickle_depickle(lambda: 1, protocol=self.protocol)(), 1)
266
267 def test_nested_lambdas(self):
268 a, b = 1, 2
269 f1 = lambda x: x + a # noqa: E731
270 f2 = lambda x: f1(x) // b # noqa: E731
271 self.assertEqual(pickle_depickle(f2, protocol=self.protocol)(1), 1)
272
273 def test_recursive_closure(self):
274 def f1():

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected