From 04ed2a5ec67fdd72a4113ba7e14968281f5f7312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:54:34 +0200 Subject: Adding debian version 0.1.21. Signed-off-by: Daniel Baumann --- debian/tests/debputy-py.test | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 debian/tests/debputy-py.test (limited to 'debian/tests/debputy-py.test') diff --git a/debian/tests/debputy-py.test b/debian/tests/debputy-py.test new file mode 100755 index 0000000..640e84b --- /dev/null +++ b/debian/tests/debputy-py.test @@ -0,0 +1,33 @@ +#!/bin/sh +set -e -u -x +mkdir "${AUTOPKGTEST_TMP}/debian" +cp -r pyproject.toml tests/ "${AUTOPKGTEST_TMP}" +cp -a debian/control "${AUTOPKGTEST_TMP}/debian" +export PYTHONWARNINGS=d +# This is a lie, but the debputy test framework will restrict certain +# plugin loading methods otherwise and that will neuter our ability to +# test the plugin test framework itself. To avoid issues, we do the +# dance below to ensure that py.test will not see the source version +# of debputy (and accordingly cannot use the uninstalled version by +# mistake). +export DEBPUTY_TEST_AGAINST_INSTALLED_PLUGINS=uninstalled +DEBPUTY_PYTHONPATH=/usr/share/dh-debputy +PYTHOHPATH=${PYTHOHPATH:-} +if [ "${PYTHOHPATH:-}" ]; then + PYTHOHPATH="${DEBPUTY_PYTHONPATH}:${PYTHOHPATH}" +else + PYTHOHPATH="${DEBPUTY_PYTHONPATH}" +fi + +export DEBPUTY_REQUIRE_LIBCAP=1 + +cd "${AUTOPKGTEST_TMP}/" + +for py in $(py3versions -s); do + echo "----------------------------------------------" + echo "Testing with $py" + echo "----------------------------------------------" + # text mode file opening is locale dependent so try both ASCII and UTF-8 + PYTHONPATH="${PYTHOHPATH}" LC_ALL=C $py -m pytest + PYTHONPATH="${PYTHOHPATH}" LC_ALL=C.UTF-8 $py -m pytest +done -- cgit v1.2.3