#!/bin/sh
set -efu

pythons="$(py3versions -r 2> /dev/null)"

cp -a docs tests.py "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

# Skip the setup.py test
sed -i '/doctest.DocTestSuite()/ d' tests.py

for python in $pythons; do
	echo "=== $python ==="
	$python tests.py 2>&1
done
