Simplified test-all.

- Tests scripts can be run directly, but only when cwd is the
  'tests' directory.
- Fixed a broken import missed in the previous commit.
This commit is contained in:
Andrew Hamilton 2017-06-28 11:38:29 +01:00
parent 09bfe79e65
commit 9e410fa796
2 changed files with 5 additions and 4 deletions

View file

@ -5,10 +5,11 @@
FAILURE=0 FAILURE=0
CODEBASE_PATH=$(realpath $(dirname $0)) CODEBASE_PATH=$(dirname $0)
for test in ${CODEBASE_PATH}/tests/*_test.py; do cd ${CODEBASE_PATH}/tests
for test in *_test.py; do
echo "Testing $test ..." echo "Testing $test ..."
python3 -m unittest ${test} 2>&1 ./${test} 2>&1
FAILURE=$(($FAILURE | $?)) FAILURE=$(($FAILURE | $?))
echo echo
done done

View file

@ -11,8 +11,8 @@ import unittest.mock
os.environ["TERM"] = "xterm-256color" os.environ["TERM"] = "xterm-256color"
import golden
import vigil.fill3 as fill3 import vigil.fill3 as fill3
import vigil.golden as golden
import vigil.tools as tools import vigil.tools as tools