Skip to content

Commit ea0ab42

Browse files
authored
Improve unittests so they disregard $AIRFLOW_HOME (#490)
Previously, when setting the `$AIRFLOW_HOME` environment variable locally, as: ``` $ export AIRFLOW_HOME=`pwd`/dev/ ``` Following our documentation to run integration tests and attempting to run our unit tests: ``` $ hatch run tests.py3.10-2.10:test-cov ``` Resulted in 11 tests failing. When unsetting `$AIRFLOW_HOME`, the tests run successfully. This PR enables our unit tests to run regardless of the system's predefined `$AIRFLOW_HOME`.
1 parent b4f7d44 commit ea0ab42

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/test/unit-cov.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
pytest \
1+
#!/bin/bash
2+
3+
# Unset AIRFLOW_HOME to avoid using the local airflow installation
4+
env -u AIRFLOW_HOME pytest \
25
-vv \
36
--cov=dagfactory \
47
--cov-report=term-missing \

0 commit comments

Comments
 (0)