#!/bin/sh -ex

pkg=python-gffutils
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
    AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
    trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
cd "$AUTOPKGTEST_TMP"
export HOME="${AUTOPKGTEST_TMP}"
cp -r /usr/lib/python3/dist-packages/gffutils/test ./
nosetests3 --with-doctest -a '!slow' test
