#!/bin/sh

set -e -u

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

cd "$AUTOPKGTEST_TMP"

# write python test file
cat <<EOF > import-private-module.py

import sys
sys.path.insert(0, '/usr/share/nfoview')

import nfoview
print(nfoview)
EOF

# run test for all supported python3 versions
for py in $PY3VERSIONS; do
	echo "Loading module with $py:"
	xvfb-run -a $py import-private-module.py
done
