tests: handle NO_PYTHON setting