summaryrefslogtreecommitdiff
path: root/tests/test_verify.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-02-22 16:13:10 +0100
committerMichał Górny <mgorny@gentoo.org>2018-02-22 16:14:25 +0100
commitb37b4010a5f3569e8379360662a925ba04a886bf (patch)
tree12ba1245be9b953425dce573bdf63f4f32883bec /tests/test_verify.py
parent27bab8dd60d200e1240cc068b4239b994ffc2f49 (diff)
downloadgemato-b37b4010a5f3569e8379360662a925ba04a886bf.tar.gz
tests: Assert for /proc being a mountpoint for cross-fs tests
Skip cross-fs tests if /proc is not a mountpoint. This handles cases when /proc exists but is not mounted which is quite normal e.g. on Gentoo/FreeBSD.
Diffstat (limited to 'tests/test_verify.py')
-rw-r--r--tests/test_verify.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_verify.py b/tests/test_verify.py
index a255068..d244c0b 100644
--- a/tests/test_verify.py
+++ b/tests/test_verify.py
@@ -278,6 +278,9 @@ class EmptyFileVerificationTest(unittest.TestCase):
(False, [('__exists__', False, True)]))
def testCrossFilesystem(self):
+ if not os.path.ismount('/proc'):
+ raise unittest.SkipTest('/proc is not a mountpoint')
+
try:
st = os.stat('/proc')
except OSError:
@@ -352,6 +355,9 @@ class EmptyFileVerificationTest(unittest.TestCase):
})
def test_update_cross_filesystem(self):
+ if not os.path.ismount('/proc'):
+ raise unittest.SkipTest('/proc is not a mountpoint')
+
try:
st = os.stat('/proc')
except OSError: