We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2ec32 commit 8054739Copy full SHA for 8054739
1 file changed
tests/test_enum.py
@@ -20,7 +20,11 @@ class _MyEnum(UintEnum):
20
assert len(_MyEnum) == 2
21
assert _MyEnum.__members__ == {"A": Uint(1), "B": Uint(2)}
22
23
+ actual = _MyEnum(Uint(1))
24
+ assert actual is _MyEnum.A
25
26
+
27
+@pytest.mark.xfail(strict=True, reason="see ethereum/ethereum-types#21")
28
def test_subclass_cast() -> None:
29
class _MyEnum(UintEnum):
30
A = 1
@@ -32,6 +36,9 @@ class _MyEnum(UintEnum):
32
36
assert isinstance(_MyEnum.B, Uint)
33
37
assert _MyEnum.B == Uint(2)
34
38
39
40
41
35
42
43
def test_auto() -> None:
44
0 commit comments