#!/bin/sh

set -ex

# make sure that the tests cannot rely on the script from the source
cp -r src "$AUTOPKGTEST_TMP"
rm "$AUTOPKGTEST_TMP/src/img2pdf.py"
cd "$AUTOPKGTEST_TMP"

for py in $(py3versions -s); do
  env img2pdfprog=/usr/bin/img2pdf \
    "$py" \
    -m pytest \
    --basetemp="$AUTOPKGTEST_ARTIFACTS/pytest" \
    --verbose \
    src/img2pdf_test.py
done
