summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:21:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:21:30 +0000
commitd8a08a53ea2f24e5d147732d75091aba7c4b3846 (patch)
tree8ac402e4f3961e8e8dcb52b35897d8131bc06fc8 /debian/tests
parentAdding upstream version 2.0.1. (diff)
downloadpython-tomli-d8a08a53ea2f24e5d147732d75091aba7c4b3846.tar.xz
python-tomli-d8a08a53ea2f24e5d147732d75091aba7c4b3846.zip
Adding debian version 2.0.1-2.debian/2.0.1-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control3
-rwxr-xr-xdebian/tests/run-unit-test19
2 files changed, 22 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..c5953ad
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: python3-tomli, python3-pytest-xdist
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100755
index 0000000..1ca1b94
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -ex
+
+pkg=python3-tomli
+
+START="$(dirname "$(dirname "$(dirname "$(readlink -fm "$0")")")")"
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cp -r ${START}/tests ./
+cp -r ${START}/benchmark ./
+
+python3 -m pytest -n auto -k "not test_own_pyproject" --strict-markers \
+ --strict-config -o xfail_strict=true