Skip to content

Commit 1c9d77d

Browse files
authored
test_udocker: Fallback if psutil.tests is missing (#1227)
Unix vendors often remove tests from installed packages. Therefore psutils.tests may be missing, in which case assume the worst and set TRAVIS = True.
1 parent 6b1e041 commit 1c9d77d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_udocker.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
import subprocess
44
import sys
55
import tempfile
6+
try:
7+
from psutil.tests import TRAVIS
8+
except ImportError:
9+
TRAVIS = True
10+
611

712
import py.path
813
import pytest # type: ignore
9-
from psutil.tests import TRAVIS # type: ignore
1014

1115
from .util import get_data, get_main_output
1216

0 commit comments

Comments
 (0)