Taragolis commented on code in PR #38892:
URL: https://github.com/apache/airflow/pull/38892#discussion_r1559456921


##########
tests/models/test_taskinstance.py:
##########
@@ -2856,8 +2856,9 @@ def on_execute_callable(context):
         ],
     )
     @patch("logging.Logger.exception")
+    @patch("logging.Logger.info")

Review Comment:
   I guess it could simplify test case and do not required to repeat same 
actions from the callback itself.
   
   ```python
   
   def test_finished_callbacks_handle_and_log_exception(self, finished_state, 
create_task_instance, caplog):
       ...
       for callback_input in [[on_finish_callable], on_finish_callable]:
           caplog.clear()
           _run_finished_callback(callbacks=callback_input, context={})
   
           assert called
           assert not completed
           assert "Executing on_finish_callable callback" in caplog.text
           assert "Error when executing on_finish_callable callback" in 
caplog.text
   
   ``` 



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