ashb commented on code in PR #22832:
URL: https://github.com/apache/airflow/pull/22832#discussion_r848161669
##########
tests/serialization/test_dag_serialization.py:
##########
@@ -1796,3 +1796,38 @@ def x(arg1, arg2, arg3):
"op_kwargs": {"arg1": [1, 2, {"a": "b"}]},
"retry_delay": timedelta(seconds=30),
}
+
+
[email protected]("ignore::DeprecationWarning")
+def test_dummy_operator_serde():
+ """
+ Test to verify that when user uses custom DummyOperator with
inherits_from_dummy_operator
+ we will have _is_empty in serialized operator.
+ """
+
+ # In this test we should NOT switch the DummyOperator to EmptyOperator.
+ # This test can be removed in Airflow 3.0 as DummyOperator will be removed
then.
+ from airflow.operators.dummy import DummyOperator
+
+ class MyDummyOperator(DummyOperator):
+ inherits_from_dummy_operator = True
Review Comment:
This doesn't test what you think/intend it to. If I set this to false the
test still passes as the `inherits_from_empty_operator = True` via the parent
class is being used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]