Run tests and report coverage separately
- ID
4645a0b- date
2025-05-09 08:42:46+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
d67f92a- message
Run tests and report coverage separately- changed files
1 file, 12 additions, 12 deletions
Changed files
ts (2986) → ts (2962)
diff --git a/ts b/ts
index 75ab585..02db7d9 100755
--- a/ts
+++ b/ts
@@ -81,22 +81,22 @@ function run_python_tests() {
[[ "$REPO_NAME" = "flickr-photos-api" ]] ||
[[ "$REPO_NAME" = "analytics.alexwlchan.net" ]]
then
- print_info "-> pytest tests"
- pytest tests/ --quiet
+ print_info "-> pytest tests --no-cov"
+ pytest tests/ --quiet --no-cov
else
print_info "-> coverage run -m pytest tests"
coverage run -m pytest tests --quiet
-
- echo ""
-
- print_info "-> coverage report"
+ fi
- if [[ $(coverage report --format=total) = "100" ]]
- then
- echo "100% coverage!"
- else
- coverage report
- fi
+ echo ""
+
+ print_info "-> coverage report"
+
+ if [[ $(coverage report --format=total) = "100" ]]
+ then
+ echo "100% coverage!"
+ else
+ coverage report
fi
}