Skip to content

Commit

Permalink
Fix test_extra_used_as_enum to use pytest.warns() (#5994)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Jun 4, 2023
1 parent 7651125 commit 1c8b00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_deprecated.py
Expand Up @@ -319,7 +319,7 @@ def test_extra_used_as_enum(
attribute: str,
value: str,
) -> None:
with pytest.raises(
with pytest.warns(
DeprecationWarning,
match=re.escape("`pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`)"),
):
Expand Down

0 comments on commit 1c8b00b

Please sign in to comment.