File size: 507 Bytes
d2816aa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/usr/bin/env bash
# make sure we are in the right directory
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
set -eu
WORKERS="${PYTEST_WORKERS:-auto}"
if [ $# -lt 1 ]
then
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal
else
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal -m "not slow"
fi
else
pytest --durations=30 -n "${WORKERS}" --dist=worksteal "$@"
fi
|