Skip to content

Commit f481aa6

Browse files
committed
fixup test assertion
1 parent 3373d13 commit f481aa6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/validators/test_with_default.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ def _raise(ex: Exception) -> None:
822822
assert exc_info.value.errors(include_url=False, include_context=False) == expected
823823

824824

825-
def test_default_factory_not_called_if_existing_error() -> None:
825+
def test_default_factory_not_called_if_existing_error(pydantic_version) -> None:
826826
class Test:
827827
def __init__(self, a: int, b: int):
828828
self.a = a
@@ -868,12 +868,11 @@ def __init__(self, a: int, b: int):
868868

869869
assert (
870870
str(e.value)
871-
== """ValidationError: 2 validation errors found
872-
2 validation errors for Test
871+
== f"""2 validation errors for Test
873872
a
874873
Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='not_an_int', input_type=str]
875-
For further information visit https://errors.pydantic.dev/2.12/v/int_parsing
874+
For further information visit https://errors.pydantic.dev/{pydantic_version}/v/int_parsing
876875
b
877876
The default factory uses validated data, but at least one validation error occurred [type=default_factory_not_called, input_value=PydanticUndefined, input_type=PydanticUndefinedType]
878-
For further information visit https://errors.pydantic.dev/2.12/v/default_factory_not_called"""
877+
For further information visit https://errors.pydantic.dev/{pydantic_version}/v/default_factory_not_called"""
879878
)

0 commit comments

Comments
 (0)