#!/bin/bash
set -e

WORKDIR=$(mktemp -d)
cd "$WORKDIR"

for dep in client server; do
    echo "Fetching source of trame-$dep"
    # TODO: if trame is in experimental, probably trame-$dep should also be
    # downloaded from experimental or, if not available, from unstable
    apt source python-trame-$dep
    cd python-trame-$dep-*

    for python in $(py3versions -s); do
        echo "Testing trame-$dep for $python"
        $python -P -m pytest -svv tests
    done
done
