From f11ca39750971629dcffdd8b81170f12cf18d129 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 27 Sep 2018 16:19:51 +0200 Subject: [PATCH] refactoring test script --- tests.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests.sh b/tests.sh index fd074ac..77c7496 100755 --- a/tests.sh +++ b/tests.sh @@ -5,16 +5,22 @@ # stop on first error set -ev +# PEP8 tests pycodestyle --ignore=W605 dotdrop/ pycodestyle tests/ pycodestyle scripts/ -# travis -PYTHONPATH=dotdrop nosetests --with-coverage --cover-package=dotdrop -# arch / debian -#PYTHONPATH=dotdrop python3 -m nose --with-coverage --cover-package=dotdrop -# others -#PYTHONPATH=dotdrop nosetests -s --with-coverage --cover-package=dotdrop +# retrieve the nosetests binary +set +e +nosebin="nosetests" +which ${nosebin} 2>/dev/null +[ "$?" != "0" ] && nosebin="nosetests3" +which ${nosebin} 2>/dev/null +[ "$?" != "0" ] && echo "Install nosetests" && exit 1 +set -e + +# execute tests with coverage +PYTHONPATH=dotdrop ${nosebin} -s --with-coverage --cover-package=dotdrop # execute bash script tests for scr in tests-ng/*.sh; do