--- /dev/null
+#!/bin/bash
+
+set -e
+
+# ensure we can use unicode filenames in the test
+export LC_ALL=en_US.UTF-8
+THISDIR=$( dirname $0 )
+export PYTHONPATH="${THISDIR}/.."
+
+declare -a PYTHON_VERSIONS=( "2.4" "2.5" "2.6" "2.7" "3.1" "3.2" "3.3" "3.4" "3.5" "3.6" "3.7" )
+TESTED_ANYHOW="n"
+
+for VERSION in "${PYTHON_VERSIONS[@]}" ; do
+
+ PYTHON="python${VERSION}"
+ if [[ $( type -t "${PYTHON}" ) == 'file' ]] ; then
+ echo
+ echo "Testing ${PYTHON} ..."
+ TESTED_ANYHOW="y"
+ ${PYTHON} ${THISDIR}/test_magic.py "$@"
+ fi
+
+done
+
+if [[ "${TESTED_ANYHOW}" == 'n' ]] ; then
+ echo "Did not found an available Python version among ${PYTHON_VERSIONS[@]}." >&2
+ exit 5
+fi
+
+echo