#!/bin/bash
set -ex

CUR_DIR=`pwd`

QUILT_PATCHES=debian/patches quilt push -a || true

if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/python-anndata-test.XXXXXX)
fi

cp -a tests/ "${AUTOPKGTEST_TMP}/"
echo > "${AUTOPKGTEST_TMP}/tests/lazy/__init__.py"

cd "$AUTOPKGTEST_TMP"

for py in $(py3versions --supported)
do
    echo "Testing with $py:"
    $py -m pytest
done
