Skip to content

Commit 0e23f4a

Browse files
refactor: Improve enum validation test case for decimal values
1 parent beffb8f commit 0e23f4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/validators/test_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,5 +447,11 @@ class MyStrEnum(Enum):
447447
with pytest.raises(ValidationError):
448448
v.validate_python((1, 2))
449449

450+
with pytest.raises(ValidationError):
451+
v.validate_python(Decimal(1.1))
452+
450453
with pytest.raises(ValidationError):
451454
v_str.validate_python(Decimal(1))
455+
456+
with pytest.raises(ValidationError):
457+
v_str.validate_python(Decimal(2.1))

0 commit comments

Comments
 (0)