#! /bin/sh

set -efu

PYS=$(py3versions -s)

# We run test_inprocess_kernel.py under unittest directly as
# it causes pytest to give a very strange error; see
# https://github.com/jupyter/qtconsole/issues/582
for py in $PYS; do
    echo "Testing with $py (pytest call):"
    xvfb-run -a -s "-screen 0 1024x768x24" \
        $py -m pytest --deselect qtconsole/tests/test_inprocess_kernel.py qtconsole/tests
    echo "Testing with $py (unittest call):"
    xvfb-run -a -s "-screen 0 1024x768x24" \
        $py -m unittest -v qtconsole/tests/test_inprocess_kernel.py
done

