---
tests/runtests.sh | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 961d9d4..8600f72 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -12,6 +12,9 @@ REQ_FILE='tests/dependencies.txt'
# virtualenv
PIP_REQUIRE_VIRTUALENV=1
+# Where to look for tests (default: tests)
+RUNTESTS=${@:-tests}
+
# this keeps track of the python version since virtualenv will use the system
# python version by default
PYTHON_SITELIB=$(python -c "from distutils.sysconfig import get_python_lib; print
get_python_lib(prefix='')")
@@ -23,7 +26,7 @@ PYTEST_ARGS="--junitxml=tests/test_results.xml
--ignore=${ENV_PATH}"
usage()
{
cat << EOF
- usage: $0
+ usage: $0 [tests]
This script prepares a virtualenv for running the tests (if it doesn't
already exist) and runs unit tests in that virtualenv.
@@ -73,7 +76,7 @@ fi
source "$ENV_PATH/bin/activate"
# Run the tests
-py.test ${PYTEST_ARGS} tests
+py.test ${PYTEST_ARGS} ${RUNTESTS}
TEST_RESULT=$?
--
1.7.6