Skip to content

Commit af0766c

Browse files
fix: StrEnum not supported in all envs
1 parent b11d3e8 commit af0766c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/validators/test_enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
import sys
33
from decimal import Decimal
4-
from enum import Enum, IntEnum, IntFlag, StrEnum
4+
from enum import Enum, IntEnum, IntFlag
55

66
import pytest
77

@@ -384,7 +384,7 @@ class MyIntEnum(IntEnum):
384384

385385
def test_enum_str_validation_should_succeed_for_decimal_with_strict_disabled():
386386
# GIVEN
387-
class MyEnum(StrEnum):
387+
class MyEnum(Enum):
388388
VALUE = '1'
389389

390390
# WHEN
@@ -401,7 +401,7 @@ class MyEnum(StrEnum):
401401

402402
def test_enum_str_validation_should_fail_for_decimal_with_strict_enabled():
403403
# GIVEN
404-
class MyEnum(StrEnum):
404+
class MyEnum(Enum):
405405
VALUE = '1'
406406

407407
# WHEN
@@ -422,7 +422,7 @@ def test_enum_int_validation_should_fail_for_incorrect_decimal_value():
422422
class MyEnum(Enum):
423423
VALUE = 1
424424

425-
class MyStrEnum(StrEnum):
425+
class MyStrEnum(Enum):
426426
VALUE = '2'
427427

428428
# WHEN

0 commit comments

Comments
 (0)