Skip to content

Commit 4db4ec8

Browse files
committed
fix test
1 parent 4088903 commit 4db4ec8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/serializers/test_list_tuple.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,8 @@ def test_tuple_fallback():
253253

254254
with pytest.warns(UserWarning) as warning_info:
255255
assert v.to_json([1, 2, 3]) == b'[1,2,3]'
256-
assert [w.message.args[0] for w in warning_info.list] == [
257-
'Pydantic serializer warnings:\n'
258-
' PydanticSerializationUnexpectedValue(Expected `tuple[any, ...]` but got '
259-
'`list` with value `[1, 2, 3]` - serialized value may not be as expected.)',
260-
]
256+
257+
assert 'Expected `tuple[any, ...]` but got `list` with value `[1, 2, 3]`' in warning_info.list[0].message.args[0]
261258

262259
msg = "Expected `tuple[any, ...]` but got `bytes` with value `b'apple'` - serialized value may not be as expected"
263260
with pytest.warns(UserWarning, match=re.escape(msg)):

0 commit comments

Comments
 (0)