This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2eda7376f4 Resolve deprecations in `serialization` tests (#40625)
2eda7376f4 is described below
commit 2eda7376f4c27df82f0cafba7699bcc46c3fcd05
Author: Bora Berke Sahin <[email protected]>
AuthorDate: Fri Jul 5 21:42:11 2024 +0300
Resolve deprecations in `serialization` tests (#40625)
---
tests/deprecations_ignore.yml | 4 ----
tests/serialization/test_dag_serialization.py | 7 ++++++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/deprecations_ignore.yml b/tests/deprecations_ignore.yml
index dfe9ca9821..35620e6417 100644
--- a/tests/deprecations_ignore.yml
+++ b/tests/deprecations_ignore.yml
@@ -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
diff --git a/tests/serialization/test_dag_serialization.py
b/tests/serialization/test_dag_serialization.py
index d95c45ed64..c0650add59 100644
--- a/tests/serialization/test_dag_serialization.py
+++ b/tests/serialization/test_dag_serialization.py
@@ -1712,7 +1712,12 @@ class TestStringifiedDAGs:
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(
[
{