Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve deprecations in serialization tests #40625

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions tests/deprecations_ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
- tests/models/test_xcom.py::TestXCom::test_set_serialize_call_old_signature


# Serialization
- tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_custom_dep_detector


# WWW
- tests/www/api/experimental/test_dag_runs_endpoint.py::TestDagRunsEndpoint::test_get_dag_runs_success
- tests/www/api/experimental/test_dag_runs_endpoint.py::TestDagRunsEndpoint::test_get_dag_runs_success_with_capital_state_parameter
Expand Down
7 changes: 6 additions & 1 deletion tests/serialization/test_dag_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,12 @@ def test_custom_dep_detector(self):
mode="reschedule",
)
CustomDepOperator(task_id="hello", bash_command="hi")
dag = SerializedDAG.to_dict(dag)
with pytest.warns(
RemovedInAirflow3Warning,
match=r"Use of a custom dependency detector is deprecated\. "
r"Support will be removed in a future release\.",
):
dag = SerializedDAG.to_dict(dag)
assert sorted(dag["dag"]["dag_dependencies"], key=lambda x: tuple(x.values())) == sorted(
[
{
Expand Down