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

Method test_aliases

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

Source from the content-addressed store, hash-verified

3927 self.assertEqual(Confused.SIXTEEN._value_, 16)
3928
3929 def test_aliases(self):
3930 Color = self.Color
3931 self.assertEqual(Color(1).name, 'RED')
3932 self.assertEqual(Color['ROJO'].name, 'RED')
3933 self.assertEqual(Color(7).name, 'WHITE')
3934 self.assertEqual(Color['BLANCO'].name, 'WHITE')
3935 self.assertIs(Color.BLANCO, Color.WHITE)
3936 Open = self.Open
3937 self.assertIs(Open['AC'], Open.AC)
3938
3939 def test_auto_number(self):
3940 class Color(Flag):

Callers

nothing calls this directly

Calls 3

ColorClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected