Skip to content

Commit 30f8428

Browse files
committed
add test
1 parent b786516 commit 30f8428

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/validators/test_with_default.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,13 @@ def test_validate_default_flags_strict():
443443
),
444444
)
445445

446+
with pytest.raises(SchemaError, match='Input should be a valid integer'):
447+
SchemaValidator(
448+
core_schema.with_default_schema(
449+
core_schema.int_schema(), default='1', validate_default='definition', strict=True
450+
)
451+
)
452+
446453

447454
def test_validate_default_factory():
448455
v = SchemaValidator(

0 commit comments

Comments
 (0)