tests: make python test dependent on HAVE_PYTHON