#!/bin/sh

set -e

cp -a skrf/tests "$AUTOPKGTEST_TMP"/

mkdir -p "$AUTOPKGTEST_TMP"/ntwks
cp -a skrf/tests/ntwks "$AUTOPKGTEST_TMP"/ntwks

mkdir -p "$AUTOPKGTEST_TMP"/qfactor_data
cp -a skrf/tests/qfactor_data "$AUTOPKGTEST_TMP"/qfactor_data

mkdir -p "$AUTOPKGTEST_TMP"/io
cp -a skrf/io/tests "$AUTOPKGTEST_TMP"/io

mkdir -p "$AUTOPKGTEST_TMP"/doc/source/examples
cp -a doc/source/examples/vectorfitting "$AUTOPKGTEST_TMP"/doc/source/examples

cd "$AUTOPKGTEST_TMP"

for py in $(py3versions --supported); do
    #Disabled tests with network
    $py -m pytest -v tests -k "\
    not test_constructor_from_touchstone_special_encoding \
    and not test_max_gain \
    and not test_max_stable_gain \
    and not test_unilateral_gain \
    "
done
