From 9e410fa7963432cc8911e20e73e8e0ae601bd252 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 28 Jun 2017 11:38:29 +0100 Subject: [PATCH] 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. --- test-all | 7 ++++--- tests/tools_test.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test-all b/test-all index 453f2a0..998df5b 100755 --- a/test-all +++ b/test-all @@ -5,10 +5,11 @@ FAILURE=0 -CODEBASE_PATH=$(realpath $(dirname $0)) -for test in ${CODEBASE_PATH}/tests/*_test.py; do +CODEBASE_PATH=$(dirname $0) +cd ${CODEBASE_PATH}/tests +for test in *_test.py; do echo "Testing $test ..." - python3 -m unittest ${test} 2>&1 + ./${test} 2>&1 FAILURE=$(($FAILURE | $?)) echo done diff --git a/tests/tools_test.py b/tests/tools_test.py index 02f77d9..a31bfbe 100755 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -11,8 +11,8 @@ import unittest.mock os.environ["TERM"] = "xterm-256color" +import golden import vigil.fill3 as fill3 -import vigil.golden as golden import vigil.tools as tools