#!/bin/sh

set -e

patch -p1 -R < debian/patches/test-path

PYVERS="$(py3versions --supported --version 2> /dev/null)"

fail=0
for pyver in $PYVERS; do
  echo "====================  test with PYTHON $pyver =================="
  if python$pyver -m pytest tests/ ;
  then
    echo "====================  test with PYTHON $pyver DONE =================="
  else
    echo "====================  test with PYTHON $pyver FAILED =================="
    fail=1
  fi
done

exit $fail
