Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plurals in validation error messages (in tests) #7972

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review comments
  • Loading branch information
Iipin committed Nov 3, 2023
commit f8181efee6b73ec71ed8677e0c86b12b4cd8bbaf
2 changes: 2 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ def test_validating_assignment_pass(ValidateAssignmentModel):
assert p.model_dump() == {'a': 2, 'b': 'hi'}


@pytest.mark.xfail(reason='Needs new release of pydantic-core')
def test_validating_assignment_fail(ValidateAssignmentModel):
p = ValidateAssignmentModel(a=5, b='hello')

Expand Down Expand Up @@ -3030,6 +3031,7 @@ class Model(BaseModel):
]


@pytest.mark.xfail(reason='Needs new release of pydantic-core')
def test_schema_generator_customize_type_constraints_order() -> None:
class Model(BaseModel):
# whitespace will be stripped first, then max length will be checked, should pass on ' 1 '
Expand Down
3 changes: 2 additions & 1 deletion tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,7 @@ class Model(BaseModel):
],
),
(dict(max_digits=2, decimal_places=2), Decimal('0.99'), Decimal('0.99')),
(
pytest.param(
dict(max_digits=2, decimal_places=1),
Decimal('0.99'),
[
Expand All @@ -3071,6 +3071,7 @@ class Model(BaseModel):
},
}
],
marks=pytest.mark.xfail(reason='Needs new release of pydantic-core'),
),
(
dict(max_digits=3, decimal_places=1),
Expand Down