Skip to content

Commit 1194798

Browse files
committed
fix tests
1 parent 9f71bfb commit 1194798

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

python/pydantic_core/core_schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3876,7 +3876,8 @@ def never_schema(
38763876
from pydantic_core import SchemaValidator, core_schema
38773877
38783878
schema = core_schema.never_schema()
3879-
v = SchemaValidator(schema) # should always fail
3879+
v = SchemaValidator(schema)
3880+
# Validation should always fail
38803881
try:
38813882
assert v.validate_python(1)
38823883
except ValidationError:

tests/test_errors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ def f(input_value, info):
410410
'Input should be a valid complex string following the rules at https://docs.python.org/3/library/functions.html#complex',
411411
None,
412412
),
413+
('never', 'Unexpected input for a field that should never be filled', None),
413414
]
414415

415416

0 commit comments

Comments
 (0)