Skip to content

Commit

Permalink
test_system: relax test_disk_partitions asserts on mountpoints (#1600)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
xrmx authored and giampaolo committed Oct 8, 2019
1 parent 2210b53 commit d461349
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions psutil/tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d461349

Please sign in to comment.