Avoid using python setup.py test

Closes #295
This commit is contained in:
ZyX 2013-03-17 13:55:31 +04:00
parent f547e8b85f
commit 84dfac6f8e
1 changed files with 4 additions and 11 deletions

View File

@ -1,19 +1,12 @@
#!/bin/sh
: ${PYTHON:=python}
FAILED=0
if ${PYTHON} -c 'import sys; sys.exit(1 * (sys.version_info >= (2, 7)))' ; then
# Python 2.6
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
for file in tests/test_*.py ; do
if ! ${PYTHON} $file ; then
FAILED=1
fi
done
else
if ! ${PYTHON} setup.py test ; then
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
for file in tests/test_*.py ; do
if ! ${PYTHON} $file ; then
FAILED=1
fi
fi
done
if ! ${PYTHON} scripts/powerline-lint ; then
FAILED=1
fi