1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/bin/sh
set -ue
testname="${1:-offline}"
testfolder="$AUTOPKGTEST_TMP/$testname"
mkdir -p "$testfolder"
cp -prd /usr/share/doc/python-osmnx-doc/examples/tests "$testfolder"
cp -p debian/tests/test_osmnx_offline.py "$testfolder/tests"
cd "$testfolder"
case "$testname" in
offline)
python3-coverage run --source osmnx -m pytest --verbose tests/test_osmnx_offline.py
;;
online)
python3-coverage run --source osmnx -m pytest --verbose tests/test_osmnx.py
;;
*)
echo 1>&2 "unknown test '$testname'"
exit 1
;;
esac
exit 0
|