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

Method test_function_qualname

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

Source from the content-addressed store, hash-verified

1584 self.assertEqual(cloned.__module__, func.__module__)
1585
1586 def test_function_qualname(self):
1587 def func(x):
1588 return x
1589
1590 # Default __qualname__ attribute (Python 3 only)
1591 if hasattr(func, "__qualname__"):
1592 cloned = pickle_depickle(func, protocol=self.protocol)
1593 self.assertEqual(cloned.__qualname__, func.__qualname__)
1594
1595 # Mutated __qualname__ attribute
1596 func.__qualname__ = "<modifiedlambda>"
1597 cloned = pickle_depickle(func, protocol=self.protocol)
1598 self.assertEqual(cloned.__qualname__, func.__qualname__)
1599
1600 def test_property(self):
1601 # Note that the @property decorator only has an effect on new-style

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected