1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00

refactoring

This commit is contained in:
deadc0de6
2020-09-03 14:21:51 +02:00
parent 0813eccbe1
commit f44fdfdc24

View File

@@ -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