()
| 55 | |
| 56 | |
| 57 | def 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 | |
| 75 | def test_comparable(): |