2018-06-25 13:15:32 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
export PREFIX=""
|
|
|
|
if [ -d 'venv' ] ; then
|
|
|
|
export PREFIX="venv/bin/"
|
|
|
|
fi
|
|
|
|
|
2018-10-09 11:27:27 +00:00
|
|
|
export VERSION_SCRIPT="import sys; print('%s.%s' % sys.version_info[0:2])"
|
|
|
|
export PYTHON_VERSION=`python -c "$VERSION_SCRIPT"`
|
|
|
|
|
2018-06-25 13:15:32 +00:00
|
|
|
set -x
|
|
|
|
|
2019-02-20 14:40:34 +00:00
|
|
|
PYTHONPATH=. ${PREFIX}pytest --ignore venv --cov-config tests/.ignore_lifespan -W ignore::DeprecationWarning --cov=starlette --cov=tests --cov-fail-under=100 --cov-report=term-missing ${@}
|
2018-10-16 14:56:28 +00:00
|
|
|
${PREFIX}mypy starlette --ignore-missing-imports --disallow-untyped-defs
|
2019-02-19 11:30:33 +00:00
|
|
|
${PREFIX}autoflake --recursive starlette tests setup.py
|
|
|
|
${PREFIX}black starlette tests setup.py --check
|