Skip to content

Commit

Permalink
test_impl: skip StrEnum test below 3.11
Browse files Browse the repository at this point in the history
Since StrEnum does not exist.

Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw committed Mar 7, 2024
1 parent 12aa32e commit c4367df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import gzip
import json
import struct
import sys
from enum import IntEnum, StrEnum
from io import BytesIO

Expand Down Expand Up @@ -114,6 +115,7 @@ class X(IntEnum):
assert json.loads(raw) == [1, 2, 9001]


@pytest.mark.skipif(sys.version_info < (3, 11), reason="StrEnum added in 3.11+")
def test_dumps_strenum():
# StrEnum is a subclass of str, so this should work transparently.
class X(StrEnum):
Expand Down

0 comments on commit c4367df

Please sign in to comment.