mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
23 lines
427 B
Bash
Executable file
23 lines
427 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Usage:
|
|
# tools/tests.sh # run all tests
|
|
# tools/tests.sh decks # test only test_decks.py
|
|
# coverage=1 tools/tests.sh # run with coverage test
|
|
|
|
dir=.
|
|
|
|
if [ x$1 = x ]; then
|
|
lim="tests"
|
|
else
|
|
lim="tests.test_$1"
|
|
fi
|
|
|
|
if [ x$coverage != x ]; then
|
|
args="--with-coverage"
|
|
else
|
|
args=""
|
|
echo "Call with coverage=1 to run coverage tests"
|
|
fi
|
|
(cd $dir && nosetests -vs $lim $args --cover-package=anki)
|
|
|