mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 07:09:18 +00:00
refactoring
This commit is contained in:
15
tests.sh
15
tests.sh
@@ -6,24 +6,24 @@
|
|||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
# PEP8 tests
|
# PEP8 tests
|
||||||
which pycodestyle 2>/dev/null
|
which pycodestyle >/dev/null 2>&1
|
||||||
[ "$?" != "0" ] && echo "Install pycodestyle" && exit 1
|
[ "$?" != "0" ] && echo "Install pycodestyle" && exit 1
|
||||||
|
echo "testing with pycodestyle"
|
||||||
pycodestyle --ignore=W503,W504,W605 dotdrop/
|
pycodestyle --ignore=W503,W504,W605 dotdrop/
|
||||||
pycodestyle tests/
|
pycodestyle tests/
|
||||||
pycodestyle scripts/
|
pycodestyle scripts/
|
||||||
|
|
||||||
# pyflakes tests
|
# pyflakes tests
|
||||||
|
echo "testing with pyflakes"
|
||||||
pyflakes dotdrop/
|
pyflakes dotdrop/
|
||||||
pyflakes tests/
|
pyflakes tests/
|
||||||
|
|
||||||
# retrieve the nosetests binary
|
# retrieve the nosetests binary
|
||||||
set +e
|
|
||||||
nosebin="nosetests"
|
nosebin="nosetests"
|
||||||
which ${nosebin} 2>/dev/null
|
which ${nosebin} >/dev/null 2>&1
|
||||||
[ "$?" != "0" ] && nosebin="nosetests3"
|
[ "$?" != "0" ] && nosebin="nosetests3"
|
||||||
which ${nosebin} 2>/dev/null
|
which ${nosebin} >/dev/null 2>&1
|
||||||
[ "$?" != "0" ] && echo "Install nosetests" && exit 1
|
[ "$?" != "0" ] && echo "Install nosetests" && exit 1
|
||||||
set -e
|
|
||||||
|
|
||||||
# do not print debugs when running tests (faster)
|
# do not print debugs when running tests (faster)
|
||||||
export DOTDROP_FORCE_NODEBUG=yes
|
export DOTDROP_FORCE_NODEBUG=yes
|
||||||
@@ -33,8 +33,8 @@ cur=`dirname $(readlink -f "${0}")`
|
|||||||
export COVERAGE_FILE="${cur}/.coverage"
|
export COVERAGE_FILE="${cur}/.coverage"
|
||||||
|
|
||||||
# execute tests with coverage
|
# execute tests with coverage
|
||||||
PYTHONPATH=dotdrop ${nosebin} -s --with-coverage --cover-package=dotdrop
|
PYTHONPATH="dotdrop" ${nosebin} -s --with-coverage --cover-package=dotdrop
|
||||||
#PYTHONPATH=dotdrop python3 -m pytest tests
|
#PYTHONPATH="dotdrop" python3 -m pytest tests
|
||||||
|
|
||||||
# enable debug logs
|
# enable debug logs
|
||||||
export DOTDROP_DEBUG=
|
export DOTDROP_DEBUG=
|
||||||
@@ -44,6 +44,7 @@ unset DOTDROP_FORCE_NODEBUG
|
|||||||
|
|
||||||
## execute bash script tests
|
## execute bash script tests
|
||||||
[ "$1" = '--python-only' ] || {
|
[ "$1" = '--python-only' ] || {
|
||||||
|
echo "doing extended tests"
|
||||||
log=`mktemp`
|
log=`mktemp`
|
||||||
for scr in tests-ng/*.sh; do
|
for scr in tests-ng/*.sh; do
|
||||||
if [ -z ${TRAVIS} ]; then
|
if [ -z ${TRAVIS} ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user