#!/bin/sh
set -efu

export HOME="$AUTOPKGTEST_TMP"
export LC_ALL=C.UTF-8
export PYTHONPATH=/usr/share/beets

cp -a test $AUTOPKGTEST_TMP
cd "$AUTOPKGTEST_TMP"
export RSRC=test/rsrc

# The tests assume beetsplug is found above them, and do unspeakable evil with
# __path__ to ensure that their local beetsplug is used.
ln -s /usr/share/beets/beetsplug .

# https://github.com/beetbox/beets/issues/1876
python3 -m pytest -k "not test_completion"
