|
4 | 4 | import pytest
|
5 | 5 | from dirty_equals import AnyThing, HasAttributes, IsList, IsPartialDict, IsStr, IsTuple
|
6 | 6 |
|
7 |
| -from pydantic_core import SchemaError, SchemaValidator, ValidationError, core_schema |
| 7 | +from pydantic_core import SchemaError, SchemaValidator, ValidationError, __version__, core_schema |
8 | 8 |
|
9 | 9 | from ..conftest import Err, plain_repr
|
10 | 10 | from .test_typed_dict import Cls
|
@@ -843,7 +843,13 @@ def test_recursive_definitions_schema() -> None:
|
843 | 843 | v.validate_python({'b': [{'a': {}}]})
|
844 | 844 |
|
845 | 845 | assert exc_info.value.errors() == [
|
846 |
| - {'type': 'list_type', 'loc': ('b', 0, 'a'), 'msg': 'Input should be a valid list', 'input': {}} |
| 846 | + { |
| 847 | + 'type': 'list_type', |
| 848 | + 'loc': ('b', 0, 'a'), |
| 849 | + 'msg': 'Input should be a valid list', |
| 850 | + 'input': {}, |
| 851 | + 'url': f'https://errors.pydantic.dev/{__version__}/v/list_type', |
| 852 | + } |
847 | 853 | ]
|
848 | 854 |
|
849 | 855 |
|
@@ -902,6 +908,6 @@ class Model:
|
902 | 908 | 'msg': 'Input should be a dictionary or an instance of Model',
|
903 | 909 | 'input': 123,
|
904 | 910 | 'ctx': {'dataclass_name': 'Model'},
|
905 |
| - 'url': 'https://errors.pydantic.dev/0.27.1/v/dataclass_type', |
| 911 | + 'url': f'https://errors.pydantic.dev/{__version__}/v/dataclass_type', |
906 | 912 | }
|
907 | 913 | ]
|
0 commit comments