Skip to content

Commit c440f31

Browse files
committed
Fix test
1 parent f4ccac2 commit c440f31

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

python/pydantic_core/core_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4251,6 +4251,7 @@ def definition_reference_schema(
42514251
'value_error',
42524252
'assertion_error',
42534253
'literal_error',
4254+
'unset_sentinel_error',
42544255
'date_type',
42554256
'date_parsing',
42564257
'date_from_datetime_parsing',

tests/test_errors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ def f(input_value, info):
340340
('assertion_error', 'Assertion failed, foobar', {'error': AssertionError('foobar')}),
341341
('literal_error', 'Input should be foo', {'expected': 'foo'}),
342342
('literal_error', 'Input should be foo or bar', {'expected': 'foo or bar'}),
343+
('unset_sentinel_error', "Input should be the 'UNSET' sentinel", None),
343344
('date_type', 'Input should be a valid date', None),
344345
('date_parsing', 'Input should be a valid date in the format YYYY-MM-DD, foobar', {'error': 'foobar'}),
345346
('date_from_datetime_parsing', 'Input should be a valid date or datetime, foobar', {'error': 'foobar'}),

tests/test_schema_functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def args(*args, **kwargs):
8282
{'type': 'timedelta', 'microseconds_precision': 'error'},
8383
),
8484
(core_schema.literal_schema, args(['a', 'b']), {'type': 'literal', 'expected': ['a', 'b']}),
85+
(core_schema.unset_sentinel_schema, args(), {'type': 'unset-sentinel'}),
8586
(
8687
core_schema.enum_schema,
8788
args(MyEnum, list(MyEnum.__members__.values())),

0 commit comments

Comments
 (0)