From f44fdfdc24363646a0e83654c64c6db4f97aea4c Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 3 Sep 2020 14:21:51 +0200 Subject: [PATCH] refactoring --- tests.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests.sh b/tests.sh index 81e7457..16be406 100755 --- a/tests.sh +++ b/tests.sh @@ -6,24 +6,24 @@ set -ev # PEP8 tests -which pycodestyle 2>/dev/null +which pycodestyle >/dev/null 2>&1 [ "$?" != "0" ] && echo "Install pycodestyle" && exit 1 +echo "testing with pycodestyle" pycodestyle --ignore=W503,W504,W605 dotdrop/ pycodestyle tests/ pycodestyle scripts/ # pyflakes tests +echo "testing with pyflakes" pyflakes dotdrop/ pyflakes tests/ # retrieve the nosetests binary -set +e nosebin="nosetests" -which ${nosebin} 2>/dev/null +which ${nosebin} >/dev/null 2>&1 [ "$?" != "0" ] && nosebin="nosetests3" -which ${nosebin} 2>/dev/null +which ${nosebin} >/dev/null 2>&1 [ "$?" != "0" ] && echo "Install nosetests" && exit 1 -set -e # do not print debugs when running tests (faster) export DOTDROP_FORCE_NODEBUG=yes @@ -33,8 +33,8 @@ cur=`dirname $(readlink -f "${0}")` export COVERAGE_FILE="${cur}/.coverage" # execute tests with coverage -PYTHONPATH=dotdrop ${nosebin} -s --with-coverage --cover-package=dotdrop -#PYTHONPATH=dotdrop python3 -m pytest tests +PYTHONPATH="dotdrop" ${nosebin} -s --with-coverage --cover-package=dotdrop +#PYTHONPATH="dotdrop" python3 -m pytest tests # enable debug logs export DOTDROP_DEBUG= @@ -44,6 +44,7 @@ unset DOTDROP_FORCE_NODEBUG ## execute bash script tests [ "$1" = '--python-only' ] || { + echo "doing extended tests" log=`mktemp` for scr in tests-ng/*.sh; do if [ -z ${TRAVIS} ]; then