Skip to content

Commit

Permalink
Make deprecation warning catch more general
Browse files Browse the repository at this point in the history
  • Loading branch information
bunchesofdonald committed Feb 2, 2024
1 parent fd1f553 commit 92ea4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/results/test_flow_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def test_flow_server_state_schema_result_is_respected(persist_result, return_sta
def my_flow():
return return_state

with pytest.warns(DeprecationWarning, match="Use `prefect.states.State` instead"):
with pytest.warns(DeprecationWarning, match="`prefect.states.State`"):
state = my_flow(return_state=True)

assert state.type == return_state.type
Expand All @@ -449,7 +449,7 @@ def my_flow():
) == return_state.dict(exclude={"id", "timestamp", "state_details", "data"})

if return_state.data:
with pytest.warns(DeprecationWarning, match="use `prefect.states.State`"):
with pytest.warns(DeprecationWarning, match="`prefect.states.State`"):
assert state.result(raise_on_failure=False) == return_state.data


Expand Down

0 comments on commit 92ea4cf

Please sign in to comment.