kyungjunleeme opened a new issue, #52761:
URL: https://github.com/apache/airflow/issues/52761

   ### Description
   
   I’ve noticed that many recent tests in the Airflow codebase use plain 
`assert` statements in the pytest style. At the same time, I see 
`mock.assert_called_once_with(...)` and similar mock assertions still being 
widely used.
   
   I’d like to confirm:
   - Is the Airflow project encouraging the exclusive use of `assert` for 
consistency?
   - Or is it acceptable to use `assert_called_once_with`, 
`assert_called_with`, etc., when working with mocks?
   
   For example, is the following usage still recommended?
   
   ```python
   mock_func = MagicMock()
   mock_func("hello")
   
   # Is this acceptable?
   mock_func.assert_called_once_with("hello")
   
   ### Use case/motivation
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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