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


##########
tests/operators/test_python.py:
##########
@@ -1155,6 +1169,21 @@ def f():
         )
         copy.deepcopy(task)
 
+    def test_except_value_error(self):
+        def f():
+            return 1
+
+        task = PythonVirtualenvOperator(
+            python_callable=f,
+            task_id="task",
+            dag=self.dag,
+        )
+
+        task.log.error = unittest.mock.Mock()

Review Comment:
   Maybe this should use `caplog` to actually capture the logs instead of 
mocking it.



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