potiuk commented on code in PR #28493:
URL: https://github.com/apache/airflow/pull/28493#discussion_r1055207462


##########
tests/decorators/test_python.py:
##########
@@ -245,84 +206,53 @@ def add_number(num: int):
 
         with self.dag:
             ret = add_number(2)
-        self.dag.create_dagrun(
-            run_id=DagRunType.MANUAL,
-            execution_date=DEFAULT_DATE,
-            start_date=DEFAULT_DATE,
-            state=State.RUNNING,
-        )
 
+        self.create_dag_run()
         with pytest.raises(AirflowException):
-
             ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
     def test_python_callable_arguments_are_templatized(self):
         """Test @task op_args are templatized"""
-        recorded_calls = []
+
+        @task_decorator
+        def arg_task(*args):
+            raise RuntimeError("Should not executed")

Review Comment:
   I like this ! 



-- 
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]

Reply via email to