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

Method test_subclassing

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

Source from the content-addressed store, hash-verified

1894
1895 @reraise_if_not_enum(Name)
1896 def test_subclassing(self):
1897 self.assertEqual(Name.BDFL, 'Guido van Rossum')
1898 self.assertTrue(Name.BDFL, Name('Guido van Rossum'))
1899 self.assertIs(Name.BDFL, getattr(Name, 'BDFL'))
1900 test_pickle_dump_load(self.assertIs, Name.BDFL)
1901
1902 def test_extending(self):
1903 class Color(Enum):

Callers

nothing calls this directly

Calls 5

test_pickle_dump_loadFunction · 0.85
assertTrueMethod · 0.80
NameClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected