diff --git a/debian/changelog b/debian/changelog index 0095da1..a9aabbb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-click (8.0.3-2) UNRELEASED; urgency=medium + + * Add autopkgtest + + -- Sandro Tosi Sun, 02 Jan 2022 21:19:45 -0500 + python-click (8.0.3-1) unstable; urgency=medium * New upstream release diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..5699968 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,4 @@ +Tests: unittests +Depends: @, + @builddeps@, +Restrictions: allow-stderr diff --git a/debian/tests/unittests b/debian/tests/unittests new file mode 100644 index 0000000..8d90a7d --- /dev/null +++ b/debian/tests/unittests @@ -0,0 +1,18 @@ +#!/bin/sh +set -efu + +pys="$(py3versions -r 2> /dev/null)" + +cp -a setup.cfg tests "$AUTOPKGTEST_TMP" + +# needed by `test_expand_args` +mkdir $AUTOPKGTEST_TMP/docs +cp -a docs/conf.py $AUTOPKGTEST_TMP/docs +cp -a setup.cfg "$AUTOPKGTEST_TMP" + +cd "$AUTOPKGTEST_TMP" + +for py in $pys; do + echo "=== $py ===" + $py -m pytest tests 2>&1 +done