MCPcopy
hub / github.com/pex-tool/pex / test_ordinal

Function test_ordinal

tests/test_enum.py:57–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def test_ordinal():
58 # type: () -> None
59
60 assert [0, 1, 2] == [color.ordinal for color in Color.values()]
61
62 class PlaceHolder(Enum["PlaceHolder.Value"]):
63 class Value(Enum.Value):
64 pass
65
66 FOO = Value("foo")
67 BAR = Value("bar")
68 BAZ = Value("baz")
69
70 PlaceHolder.seal()
71
72 assert [0, 1, 2] == [place_holder.ordinal for place_holder in PlaceHolder.values()]
73
74
75def test_comparable():

Callers

nothing calls this directly

Calls 2

sealMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected