mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
fix unit tests
This commit is contained in:
parent
9b62da5634
commit
5c27e54f0a
1 changed files with 12 additions and 4 deletions
|
@ -1,9 +1,16 @@
|
||||||
#!/bin/bash
|
#!/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
|
||||||
|
|
||||||
if [ -d 'locale' ]; then
|
dir=.
|
||||||
dir=..
|
|
||||||
|
if [ x$1 = x ]; then
|
||||||
|
lim="tests"
|
||||||
else
|
else
|
||||||
dir=.
|
lim="tests.test_$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x$coverage != x ]; then
|
if [ x$coverage != x ]; then
|
||||||
|
@ -12,4 +19,5 @@ else
|
||||||
args=""
|
args=""
|
||||||
echo "Call with coverage=1 to run coverage tests"
|
echo "Call with coverage=1 to run coverage tests"
|
||||||
fi
|
fi
|
||||||
(cd $dir && nosetests -vs $args --cover-package=anki $@)
|
(cd $dir && nosetests -vs $lim $args --cover-package=anki)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue