diff options
author | Gard Spreemann <gspr@nonempty.org> | 2019-10-23 12:28:46 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2019-10-23 12:28:46 +0200 |
commit | bc9b55f6595c6406c4188fec126782bc1e083912 (patch) | |
tree | 13789b0ebfa2d4a66aee6ae347d2ac7a81238128 | |
parent | 4724a609660eabbb9ad63e005db35cd1256418a9 (diff) |
Simplify tests for new version.
-rw-r--r-- | debian/tests/control | 2 | ||||
-rw-r--r-- | debian/tests/python-upstream.py | 17 | ||||
-rwxr-xr-x | debian/tests/python-upstream.sh | 10 |
3 files changed, 10 insertions, 19 deletions
diff --git a/debian/tests/control b/debian/tests/control index 65510cef..69d685df 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Tests: python-upstream.sh -Depends: python3-all, python3-gudhi, python3-pytest +Depends: python3-all, python3-gudhi diff --git a/debian/tests/python-upstream.py b/debian/tests/python-upstream.py deleted file mode 100644 index 098701aa..00000000 --- a/debian/tests/python-upstream.py +++ /dev/null @@ -1,17 +0,0 @@ -import pytest -import os - -tmpdir = os.getenv("AUTOPKGTEST_TMP") - -if tmpdir is None: - print("Need the environment variable AUTOPKGTEST_TMP.") - exit(1) - -cwd = os.getcwd() -test_path = cwd + "/cython/test" - -os.chdir(tmpdir) - -print("Running tests from %s with cwd %s." %(test_path, os.getcwd())) - -exit(pytest.main([test_path])) diff --git a/debian/tests/python-upstream.sh b/debian/tests/python-upstream.sh index e292ab76..a83dfdcc 100755 --- a/debian/tests/python-upstream.sh +++ b/debian/tests/python-upstream.sh @@ -1,9 +1,17 @@ #!/bin/bash set -e +set -u + +testdir=$PWD/src/python/test +cd $AUTOPKGTEST_TMP for py3ver in $(py3versions -vs) do echo "Running tests with Python ${py3ver}." - /usr/bin/python${py3ver} -B debian/tests/python-upstream.py + for t in $(find $testdir -type f -name 'test_*.py') + do + echo "Running test ${t}." + /usr/bin/python${py3ver} -B $t + done done |