File: unittests

package info (click to toggle)
python-pkginfo 1.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 792 kB
  • sloc: python: 2,025; makefile: 67; sh: 14
file content (20 lines) | stat: -rwxr-xr-x 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
set -efu

pys="$(py3versions -r 2> /dev/null)"

cp -a docs "$AUTOPKGTEST_TMP"
mkdir -p "$AUTOPKGTEST_TMP"/notpkginfo
cp -a pkginfo/tests "$AUTOPKGTEST_TMP"/notpkginfo
cat >> "$AUTOPKGTEST_TMP/notpkginfo/tests/__init__.py" <<EOF
import sys
sys.modules['pkginfo.tests'] = sys.modules[__name__]
EOF

cd "$AUTOPKGTEST_TMP"

for py in $pys; do
	echo "=== $py ==="
	# Not compatible with running outside the source tree:
	$py -m pytest notpkginfo/tests -k 'not (test_ctor_w_path or test_ctor_w_egg_info_as_file)'
done