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


##########
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:
   Last time that I checked the following `if` in the constructor wasn't 
covered (it might 
[have](https://app.codecov.io/gh/apache/airflow/tree/master/airflow/operators) 
since then):
   ````python
           if templates_exts:
               self.template_ext = templates_exts
   ````



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