tools: if pytest fails to import, skip the tool option parsing test

It's not the most important test outside of my machine and CI, so let's just
skip over it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
Peter Hutterer 2020-03-20 16:16:48 +10:00
parent b35a32dd9d
commit 4d92ea116c

View file

@ -24,12 +24,18 @@
# DEALINGS IN THE SOFTWARE.
import os
import pytest
import resource
import sys
import subprocess
import logging
try:
import pytest
except ImportError:
print('Failed to import pytest. Skipping.', file=sys.stderr)
sys.exit(77)
logger = logging.getLogger('test')
logger.setLevel(logging.DEBUG)