From d4613497d8a0f32b6b5864461f9ca26ff623ea80 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 8 Oct 2019 17:19:31 +0200 Subject: [PATCH] test_system: relax test_disk_partitions asserts on mountpoints (#1600) As on at least Solaris and modern Linux systems they can be files too. On linux bind mounts may commonly be used with containers. Fix #1573 --- psutil/tests/test_system.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index 38843b0ee..83d7ef304 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -501,11 +501,8 @@ def test_disk_partitions(self): # we cannot make any assumption about this, see: # http://goo.gl/p9c43 disk.device - if SUNOS or TRAVIS: - # on solaris apparently mount points can also be files - assert os.path.exists(disk.mountpoint), disk - else: - assert os.path.isdir(disk.mountpoint), disk + # on modern systems mount points can also be files + assert os.path.exists(disk.mountpoint), disk assert disk.fstype, disk # all = True