Taragolis commented on PR #29086:
URL: https://github.com/apache/airflow/pull/29086#issuecomment-1399356122

   I have a look at the [warning 
logs](https://github.com/apache/airflow/actions/runs/3975529582), It is very 
hard to find where actually it raised. But finally I found only one type of 
pytest-specific warning. 
   
   When we won't expected any warnings in test case we use
   
   ```python
   with pytest.warns(None):
       ...
   ```
   
   But we should: 
https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests
   
   ```python
   with warnings.catch_warnings():
       warnings.simplefilter("error")
       ...
   ```
   
   We should do this as follow up however **I have a suspicion** that 
recommended solution wouldn't work because [pytest-capture-warnings 
](https://github.com/athinkingape/pytest-capture-warnings) suppress this 
errored-warning, see: 
https://github.com/apache/airflow/pull/28590#issuecomment-1366560903
   


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

Reply via email to