Bowrna commented on code in PR #38525: URL: https://github.com/apache/airflow/pull/38525#discussion_r1542331163
########## tests/providers/sftp/triggers/test_sftp.py: ########## @@ -176,12 +176,11 @@ async def test_sftp_trigger_run_trigger_failure_state(self, mock_get_files_by_pa trigger = SFTPTrigger(path="test/path/", sftp_conn_id="sftp_default", file_pattern="my_test_file") expected_event = {"status": "failure", "message": "An unexpected exception"} - - with pytest.raises(Exception): Review Comment: @utkarsharma2 @pankajastro I think this test for verifying the exception is not handled correctly. I hope the with for pytest.raises exception was written to handle the exception thrown by trigger.run(). But right now the code throws exception in the assert part, as the assert didn't match and as its wrapped inside with statement, the test case passes. It is originally intended to catch the trigger.run() exception right? I will try fixing this part. -- 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