diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-02-22 16:13:10 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-02-22 16:14:25 +0100 |
commit | b37b4010a5f3569e8379360662a925ba04a886bf (patch) | |
tree | 12ba1245be9b953425dce573bdf63f4f32883bec /tests/test_find_top_level.py | |
parent | 27bab8dd60d200e1240cc068b4239b994ffc2f49 (diff) | |
download | gemato-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_find_top_level.py')
-rw-r--r-- | tests/test_find_top_level.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_find_top_level.py b/tests/test_find_top_level.py index a326384..17f83c4 100644 --- a/tests/test_find_top_level.py +++ b/tests/test_find_top_level.py @@ -159,8 +159,8 @@ class TestCrossDevice(TempDirTestCase): } def setUp(self): - if not os.path.exists('/proc'): - raise unittest.SkipTest('/proc does not exist') + if not os.path.ismount('/proc'): + raise unittest.SkipTest('/proc is not a mountpoint') super(TestCrossDevice, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'test')) |