From fc8090758c7179a9abd816cf6ecf8dc6f0b7ddc5 Mon Sep 17 00:00:00 2001 From: "mmore500.login+git@gmail.com" Date: Sat, 8 May 2021 23:19:06 -0400 Subject: [PATCH] Run tests with python3.8 or better --- dishpylib/test/run_tests.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dishpylib/test/run_tests.sh b/dishpylib/test/run_tests.sh index 78e3a30dc4..7cac322df6 100755 --- a/dishpylib/test/run_tests.sh +++ b/dishpylib/test/run_tests.sh @@ -4,4 +4,13 @@ set -e # exit with error if any of this fails script_dir="$(dirname "$(readlink -f "$0")")" -nosetests "${script_dir}"/**/test_*.py +which_python="$(\ + command -v python3.8 \ + || command -v python3.9 \ + || echo python3 \ +)" +echo "which_python ${which_python}" + +"${which_python}" -c "import sys; assert sys.version_info >= (3, 8, 0)" + +"${which_python}" "$(which nosetests)" "${script_dir}"/**/test_*.py