Skip to content

Commit

Permalink
Add xfailing test for pydantic-core PR 766 (#6641)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontagu authored Jul 13, 2023
1 parent 15c984a commit 7fd713c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,10 @@ def test_validating_assignment_value_change(ValidateAssignmentModel):
assert p.c == 0
p.c = 3
assert p.c == 6
assert p.model_dump()['c'] == 6


@pytest.mark.xfail(reason='requires https://github.com/pydantic/pydantic-core/pull/766')
def test_validating_assignment_extra(ValidateAssignmentModel):
p = ValidateAssignmentModel(b='hello', extra_field=1.23)
assert p.extra_field == 1.23
Expand All @@ -414,6 +416,7 @@ def test_validating_assignment_extra(ValidateAssignmentModel):
assert p.extra_field == 1.23
p.extra_field = 'bye'
assert p.extra_field == 'bye'
assert p.model_dump()['extra_field'] == 'bye'


def test_validating_assignment_dict(ValidateAssignmentModel):
Expand Down

0 comments on commit 7fd713c

Please sign in to comment.