MCPcopy Index your code
hub / github.com/RustPython/RustPython / Types

Class Types

Lib/test/test_enum.py:3451–3460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3449
3450 def test_add_value_alias_during_creation(self):
3451 class Types(Enum):
3452 Unknown = 0,
3453 Source = 1, 'src'
3454 NetList = 2, 'nl'
3455 def __new__(cls, int_value, *value_aliases):
3456 member = object.__new__(cls)
3457 member._value_ = int_value
3458 for alias in value_aliases:
3459 member._add_value_alias_(alias)
3460 return member
3461 self.assertIs(Types(0), Types.Unknown)
3462 self.assertIs(Types(1), Types.Source)
3463 self.assertIs(Types('src'), Types.Source)

Callers 2

get_condition_matcherFunction · 0.85

Calls

no outgoing calls

Tested by 1