Skip to content

Commit

Permalink
patch: fixed a bug in run.sh:run-tests with the test-reports dir
Browse files Browse the repository at this point in the history
  • Loading branch information
phitoduck committed May 20, 2024
1 parent b188260 commit f62057f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion {{cookiecutter.repo_name}}/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ function test:ci {
# (example) ./run.sh test tests/test_states_info.py::test__slow_add
function run-tests {
PYTEST_EXIT_STATUS=0
rm -rf "$THIS_DIR/test-reports" || true

# clean the test-reports dir
rm -rf "$THIS_DIR/test-reports" || mkdir "$THIS_DIR/test-reports"

# execute the tests, calculate coverage, and generate coverage reports in the test-reports dir
python -m pytest ${@:-"$THIS_DIR/tests/"} \
--cov "${COVERAGE_DIR:-$THIS_DIR/src}" \
--cov-report html \
Expand Down

0 comments on commit f62057f

Please sign in to comment.