diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-13 23:28:57 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-13 23:28:57 +0100 |
| commit | 29846dab6fdb1d7a9e46fb644417217cedffd115 (patch) | |
| tree | f43c587f6684514bea3461203dc6313ad2d57d26 /psutil/tests/test_linux.py | |
| parent | 2ec9eee4dc1291f291f8ef25474d82f37b43f133 (diff) | |
| download | psutil-29846dab6fdb1d7a9e46fb644417217cedffd115.tar.gz | |
#1681, revert 00a3398
Diffstat (limited to 'psutil/tests/test_linux.py')
| -rwxr-xr-x | psutil/tests/test_linux.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 5a48a445..97946a0b 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1067,25 +1067,6 @@ class TestSystemDiskPartitions(unittest.TestCase): finally: psutil.PROCFS_PATH = "/proc" - @unittest.skipIf(not os.path.exists('/proc/swaps'), - "/proc/swaps not available") - def test_swap(self): - with open('/proc/swaps') as f: - if not f.readline() or not f.readlines(): - raise self.skipTest("/proc/swaps is empty") - types = [x.fstype for x in psutil.disk_partitions(all=False)] - self.assertNotIn('swap', types) - types = [x.fstype for x in psutil.disk_partitions(all=True)] - self.assertIn('swap', types) - for part in psutil.disk_partitions(all=True): - if part.fstype == 'swap': - assert os.path.exists(part.device), part - self.assertIsNone(part.mountpoint) - if part.opts: - assert part.opts.startswith('priority=') - prio = part.opts.split('=')[1] - int(prio) - @unittest.skipIf(not LINUX, "LINUX only") class TestSystemDiskIoCounters(unittest.TestCase): |
