File: pytest

package info (click to toggle)
anonip 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 200 kB
  • sloc: python: 990; sh: 37; makefile: 8
file content (22 lines) | stat: -rwxr-xr-x 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

# ensure temporary directory exists
if [ -z "$AUTOPKGTEST_TMP" ] ; then
  AUTOPKGTEST_TMP=$( mktemp -d )
fi

# setup test environment
cp -r tests.py "$AUTOPKGTEST_TMP/"
cp -r conftest.py "$AUTOPKGTEST_TMP/"
cd "$AUTOPKGTEST_TMP"

# upstream provides unit tests, but some have the local source hardcoded,
# while we want to test the installed package
sed -e "s_anonip.py_/usr/bin/anonip_" -i tests.py

for py in $(py3versions -s); do
    $py -Wd -m pytest -r a -vv tests.py 2>&1;
done