uranusjr commented on code in PR #37028: URL: https://github.com/apache/airflow/pull/37028#discussion_r1630868400
########## tests/operators/test_python.py: ########## @@ -229,6 +229,21 @@ def test_python_callable_keyword_arguments_are_templatized(self): assert rendered_op_kwargs["a_date"] == date(2019, 1, 1) assert rendered_op_kwargs["a_templated_string"] == f"dag {self.dag_id} ran on {self.ds_templated}." + def test_python_callable_keyword_arguments_callable_not_templatized(self): + """Test PythonOperator op_kwargs are not templatized if it's a callable""" + + def a_fn(): + return 4 + + task = self.render_templates( + lambda: 0, Review Comment: I don’t even understand why this is `lambda: 0` (isn’t think the context…?) but since that’s what all other tests use… -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org