#! /bin/sh

set -e

PYS=$(py3versions -s)

# Some tests have to be excluded for various reasons

EXCLUDE=""

# This test hangs.
# Reported to: 
EXCLUDE="${EXCLUDE} --deselect=spyder_unittest/widgets/tests/test_datatree.py::test_contextMenuEvent_calls_exec"

for py in $PYS; do
    echo "Testing with $py:"
    tempdir=$(mktemp -d -p "$AUTOPKGTEST_TMP")
    HOME="$tempdir" \
      xvfb-run -a -s "-screen 0 1024x768x24 +extension GLX" \
      $py -m pytest -vv $EXCLUDE spyder_unittest || true
done
