
#!/bin/sh
set -efu

export PYTHONWARNINGS=d

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

cp -r tests "$AUTOPKGTEST_TMP/"
cd "$AUTOPKGTEST_TMP"

for py in $python3_all; do
    echo "=== $py ==="
    $py -m pytest --verbose \
        --ignore tests/test_codespell.py \
        --ignore tests/test_flake8.py \
        --ignore tests/test_memory.py \
        --ignore tests/test_pylint.py \
        --ignore tests/test_spikes.py \
        --ignore tests/test_tesseract.py \
        --ignore tests/test_textextract.py \
        --ignore tests/test_story.py \
        --ignore tests/test_release.py \
        --ignore tests/test_barcode.py \
        -k "not test_3050 \
            and not test_textbox3 \
            and not test_subset_fonts \
            and not test_fontarchive \
            and not test_htmlbox1 \
            and not test_color_count \
            and not test_4309 \
            and not test_3624 \
            and not test_2246 \
            and not test_1645 \
            and not test_pilsave \
            and not test_deletion \
            and not test_open2 \
            and not test_4457 \
            and not test_4533 \
            and not test_4702 \
            and not test_4445 \
            and not test_3493 \
            and not test_3806 \
            and not test_4613 \
            and not test_4392 \
            and not test_cli \
            and not test_cli_out \
            and not test_3854 \
            and not test_4415 \
            and not test_4435" \
        2>&1
done
