1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00
svtplay-dl/run-tests.sh
Anders Waldenborg dcf4c1bd23 Add doctests for new functions in utils
The print call is there to make it py2/3 compatible (py2 adds u'' where py3 just adds '')
2014-01-25 22:57:49 +01:00

39 lines
541 B
Bash
Executable File

#!/bin/sh
OPTS='--all-modules --with-doctest '
die() {
echo Error: "$@"
exit 1
}
COVER_OPTS="--with-coverage --cover-package=svtplay_dl"
NOSETESTS=nosetests
while [ "$#" -gt 0 ]; do
case $1 in
-3)
NOSETESTS=nosetests3
;;
-c|--coverage)
OPTS="$OPTS $COVER_OPTS"
;;
-C|--coverage-html)
OPTS="$OPTS $COVER_OPTS --cover-html"
;;
-v|--verbose)
OPTS="$OPTS --verbose"
;;
-*)
die "Unknown option: '$1'"
;;
*)
die "Unknown argument: '$1'"
;;
esac
shift
done
PYTHONPATH=lib $NOSETESTS $OPTS