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
|
#!/bin/bash
set -e
pkg=q2_sample_classifier
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
cp -a /usr/lib/python3/dist-packages/${pkg}* "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
if [ ! -f /usr/lib/python3/dist-packages/pytest_cov/__init__.py ] ; then
echo "Please install package python3-pytest-cov to run this script"
exit 1
fi
# Run build-time tests
# for py in $(py3versions -s 2> /dev/null)
# do
# ${py} -m pytest -v --cov=${pkg}
# done
#
python3.11 -m pytest -v --cov=${pkg}
|