Skip to content

Commit

Permalink
test_impl: fix import
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw committed Mar 7, 2024
1 parent c4367df commit 9020341
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import json
import struct
import sys
from enum import IntEnum, StrEnum
from enum import IntEnum
from io import BytesIO

import pytest
Expand Down Expand Up @@ -117,6 +117,8 @@ class X(IntEnum):

@pytest.mark.skipif(sys.version_info < (3, 11), reason="StrEnum added in 3.11+")
def test_dumps_strenum():
from enum import StrEnum

# StrEnum is a subclass of str, so this should work transparently.
class X(StrEnum):
A = "foo"
Expand Down

0 comments on commit 9020341

Please sign in to comment.