Add test-cov-html script for local coverage

analysis and debugging
This commit is contained in:
Sebastián Ramírez 2018-12-22 07:42:24 +04:00
parent c25a71e352
commit 23ef570bf6
2 changed files with 7 additions and 2 deletions

6
scripts/test-cov-html.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
set -x
bash scripts/test.sh --cov-report=html

View File

@ -7,8 +7,7 @@ export VERSION_SCRIPT="import sys; print('%s.%s' % sys.version_info[0:2])"
export PYTHON_VERSION=`python -c "$VERSION_SCRIPT"` export PYTHON_VERSION=`python -c "$VERSION_SCRIPT"`
export PYTHONPATH=./docs/src export PYTHONPATH=./docs/src
# PYTHONPATH=. pytest --cov=fastapi --cov=tests --cov-fail-under=100 --cov-report=term-missing ${@} --cov-report=html pytest --cov=fastapi --cov=tests --cov=docs/src --cov-report=term-missing ${@}
pytest --cov=fastapi --cov=tests --cov=docs/src --cov-report=term-missing ${@} --cov-report=html
mypy fastapi --disallow-untyped-defs mypy fastapi --disallow-untyped-defs
if [ "${PYTHON_VERSION}" = '3.7' ]; then if [ "${PYTHON_VERSION}" = '3.7' ]; then
echo "Skipping 'black' on 3.7. See issue https://github.com/ambv/black/issues/494" echo "Skipping 'black' on 3.7. See issue https://github.com/ambv/black/issues/494"