#!/bin/sh
#!/bin/bash
set -e

pkg=dipy

export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  # shellcheck disable=SC2064
  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi

cd "${AUTOPKGTEST_TMP}"

python3 -m pytest \
    --no-header -p no:cacheprovider \
    --ignore=/usr/lib/python3/dist-packages/dipy/io/tests/test_stateful_surface.py \
    --ignore=/usr/lib/python3/dist-packages/dipy/io/tests/test_stateful_tractogram.py \
    --ignore=/usr/lib/python3/dist-packages/dipy/io/tests/test_streamline.py \
    --ignore=/usr/lib/python3/dist-packages/dipy/io/tests/test_utils.py \
    -k 'not test_streamwarp.py and not test_lpca.py and not test_sfm.py and not test_reconst_csa_csd.py and not test_rumba.py and not test_reconst_rumba.py' \
    /usr/lib/python3/dist-packages/dipy
