From 9020341de189c9ae0f2fd14f8759e9127581b2a5 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 7 Mar 2024 12:19:43 -0500 Subject: [PATCH] test_impl: fix import Signed-off-by: William Woodruff --- test/test_impl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_impl.py b/test/test_impl.py index b12c9d4..5e54a44 100644 --- a/test/test_impl.py +++ b/test/test_impl.py @@ -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 @@ -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"