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

Method test_pickle_nested_class

Lib/test/test_enum.py:1836–1844  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1834 test_pickle_dump_load(self.assertIs, Question)
1835
1836 def test_pickle_nested_class(self):
1837 # would normally just have this directly in the class namespace
1838 class NestedEnum(Enum):
1839 twigs = 'common'
1840 shiny = 'rare'
1841
1842 self.__class__.NestedEnum = NestedEnum
1843 self.NestedEnum.__qualname__ = '%s.NestedEnum' % self.__class__.__name__
1844 test_pickle_dump_load(self.assertIs, self.NestedEnum.twigs)
1845
1846 def test_pickle_by_name(self):
1847 class ReplaceGlobalInt(IntEnum):

Callers

nothing calls this directly

Calls 1

test_pickle_dump_loadFunction · 0.85

Tested by

no test coverage detected