MCPcopy Index your code
hub / github.com/python/cpython / test_private_nested_classes

Method test_private_nested_classes

Lib/test/pickletester.py:4219–4229  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4217 self.assertEqual(unpickled(), 44)
4218
4219 def test_private_nested_classes(self):
4220 if self.py_version < (3, 15):
4221 self.skipTest('not supported in Python < 3.15')
4222 cls1 = PrivateNestedClasses.get_nested()
4223 cls2 = cls1.get_nested2()
4224 for proto in protocols:
4225 with self.subTest(proto=proto):
4226 unpickled = self.loads(self.dumps(cls1, proto))
4227 self.assertIs(unpickled, cls1)
4228 unpickled = self.loads(self.dumps(cls2, proto))
4229 self.assertIs(unpickled, cls2)
4230
4231 def test_object_with_attrs(self):
4232 obj = Object()

Callers

nothing calls this directly

Calls 7

skipTestMethod · 0.80
get_nestedMethod · 0.80
get_nested2Method · 0.80
subTestMethod · 0.45
loadsMethod · 0.45
dumpsMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected