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

   > to my knowledge the function lacked tests to begin with and i was 
wondering how to test this as it requires a backend db with DAG runs
   
   Yeah it required db backend, if you [run in 
venv](https://github.com/apache/airflow/blob/main/TESTING.rst#running-unit-tests-in-local-virtualenv)
 I thought it would be enough to use SQLite, Airflow created it by default if 
no backend provided (`${AIRFLOW_HOME}/airflow.db` or 
`${AIRFLOW_HOME}/unittests.db`), if test DB not initialised you could run 
`pytest` with flag `--with-db-init`
   
   If you run tests inside of 
[Breeze](https://github.com/apache/airflow/blob/main/TESTING.rst#running-tests-using-breeze-from-the-host)
 then you already have DB backend by default i think it is Postgres.
   
   And at least PyCharm/IDEA correctly detected all tests out of the box, so 
you could easily run it in it (just make sure you configure venv)
   
   BTW, [boring-cyborg](https://github.com/apps/boring-cyborg) also provide 
useful links for First time contributor


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