Debian Codegraph @

debian/tests/pytest

raw
1 #!/bin/sh
2
3 set -e
4
5 # ensure temporary directory exists
6 if [ -z "$AUTOPKGTEST_TMP" ] ; then
7 AUTOPKGTEST_TMP=$( mktemp -d )
8 fi
9
10 # setup test environment
11 cp -r tests.py "$AUTOPKGTEST_TMP/"
12 cp -r conftest.py "$AUTOPKGTEST_TMP/"
13 cd "$AUTOPKGTEST_TMP"
14
15 # upstream provides unit tests, but some have the local source hardcoded,
16 # while we want to test the installed package
17 sed -e "s_anonip.py_/usr/bin/anonip_" -i tests.py
18
19 for py in $(py3versions -s); do
20 $py -Wd -m pytest -r a -vv tests.py 2>&1;
21 done
22