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

Method test_add_value_alias_after_creation

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

Source from the content-addressed store, hash-verified

3469 self.assertEqual(Color.ORG.ORG, 'huh')
3470
3471 def test_add_value_alias_after_creation(self):
3472 class Color(Enum):
3473 RED = 1
3474 GREEN = 2
3475 BLUE = 3
3476 Color.RED._add_value_alias_(5)
3477 self.assertIs(Color.RED, Color(5))
3478
3479 def test_add_value_alias_during_creation(self):
3480 class Types(Enum):

Callers

nothing calls this directly

Calls 3

_add_value_alias_Method · 0.80
ColorClass · 0.70
assertIsMethod · 0.45

Tested by

no test coverage detected