#!/bin/sh -e
set -efu

export PYTHONWARNINGS=d

python3_all="$(py3versions -s 2>/dev/null)"

TESTS_TO_EXCLUDE="not test_2 and \
not test_3 and \
not test_4 and \
not test_5 and \
not test_6 and \
not test_nonfree_175 and \
not test_nonfree_dmca and \
not test_nonfree_f1040nr and \
not test_nonfree_i1040nr and \
not test_nonfree_kampo and \
not test_nonfree_naacl06_shinyama and \
not test_nlp2004slides and \
not test_nonfree_dmca and \
not test_nonfree_175 and \
not test_nonfree_cmp_itext_logo and \
not test_simple3_with_file and \
not test_simple3_with_string and \
not test_get_cmap_from_pickle"

cp -r tests tools samples "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

for py in $python3_all; do
    echo "=== $py ==="
    $py -m pytest --verbose -k "${TESTS_TO_EXCLUDE}" 2>&1
done

