#!/bin/sh

export PYTHONWARNINGS=d

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

TESTS_TO_EXCLUDE="not test_pytest_plugin and not test_function_times_out_no_rise and not test_function_times_out and not test_retry_three_times_no_raise_assert and not test_session_new_window_with_direction and not test_new_window_with_direction"

cp -r tests $AUTOPKGTEST_TMP
cd "$AUTOPKGTEST_TMP"

ret=0

for py in $python3_all; do
    echo "=== $py ==="
    $py -m pytest -k "$TESTS_TO_EXCLUDE" || ret=1
done

exit $ret
