Skip to content

Commit 2696529

Browse files
committed
add xfail test
1 parent f74276d commit 2696529

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/serializers/test_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,7 @@ def test_no_warn_on_exclude() -> None:
11031103
assert s.to_python(value, mode='json', exclude={'b'}) == {'a': 0}
11041104

11051105

1106+
@pytest.mark.xfail(reason='Currently failing bc of a lack of warning, but equivalent script is passing...')
11061107
def test_warn_on_missing_field() -> None:
11071108
class AModel(BasicModel): ...
11081109

@@ -1143,7 +1144,7 @@ class BModel(BasicModel): ...
11431144
)
11441145
)
11451146

1146-
value = BasicModel(root=AModel(type='a')) # missing 'a' field
1147+
value = BasicModel(root=AModel(type='a'))
11471148
with pytest.warns(
11481149
UserWarning,
11491150
match='Expected 2 fields but got 1 for field root of type.+',

0 commit comments

Comments
 (0)