#!/bin/sh
set -eu

# Run outside the source tree so imports exercise the installed package.
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT HUP INT TERM
cp -r tests "$workdir/"
cd "$workdir"
for python in $(py3versions -s); do
    "$python" -c 'import python_codon_tables; print(python_codon_tables.__file__)'
    "$python" -m pytest -q tests
done
