diff --git a/pyproject.toml b/pyproject.toml index b257b7aed5..febbf9c5f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ exclude = ''' ''' [tool.pytest.ini_options] +addopts = "--cov=nemo_reinforcer --cov-report=term --cov-report=json -s -rA -x" testpaths = ["tests"] python_files = "test_*.py" diff --git a/tests/run_unit.sh b/tests/run_unit.sh index f51ff49ff6..5367749199 100755 --- a/tests/run_unit.sh +++ b/tests/run_unit.sh @@ -29,11 +29,10 @@ if ! ray status &>/dev/null; then fi export PYTHONPATH=$(realpath ${SCRIPT_DIR}/..):${PYTHONPATH:-} -export RAY_DEDUP_LOGS=0 # Run unit tests echo "Running unit tests..." -if ! pytest unit/ --cov=nemo_reinforcer --cov-report=term --cov-report=json -s -rA "$@"; then +if ! pytest unit/ "$@"; then echo "[ERROR]: Unit tests failed." exit 1 fi