You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/29 06:54:39 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #27797: Add tests to PythonOperator

uranusjr commented on code in PR #27797:
URL: https://github.com/apache/airflow/pull/27797#discussion_r1034360950


##########
tests/operators/test_python.py:
##########
@@ -375,6 +375,20 @@ def func():
             "INFO:airflow.task.operators:Done. Returned value not shown" in cm.output
         ), "Log message that the option is turned off should be shown"
 
+    def test_python_operator_templates_exts(self):
+        def func():
+            return "test_return_value"
+
+        python_operator = PythonOperator(
+            task_id="python_operator",
+            python_callable=func,
+            dag=self.dag,
+            show_return_value_in_logs=False,
+            templates_exts=['test_ext']
+        )
+
+        assert python_operator.template_ext == ['test_ext']

Review Comment:
   Why is this test relevant? `tempalte_ext` is a property on BaseOperator, is it not?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org