summaryrefslogtreecommitdiffhomepage
path: root/test/unit/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/utils.py')
-rw-r--r--test/unit/utils.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/utils.py b/test/unit/utils.py
index f9e9d08a..d6590b97 100644
--- a/test/unit/utils.py
+++ b/test/unit/utils.py
@@ -72,12 +72,19 @@ def waitforsocket(port):
pytest.fail('Can\'t connect to the 127.0.0.1:' + str(port))
-def findmnt():
+def check_findmnt():
try:
- out = subprocess.check_output(
+ return subprocess.check_output(
['findmnt', '--raw'], stderr=subprocess.STDOUT
).decode()
except FileNotFoundError:
+ return False
+
+
+def findmnt():
+ out = check_findmnt()
+
+ if not out:
pytest.skip('requires findmnt')
return out