From 1ebe625e5aa21b33e9de5652c305d1d0a2147059 Mon Sep 17 00:00:00 2001 From: wiggin15 Date: Tue, 26 Sep 2017 14:52:42 +0300 Subject: AIX support (#1123) * AIX support * AIX support * AIX support * AIX support - use get_procfs_path() instead of /proc * AIX support - group sections like in other modules * AIX support * AIX support * AIX support * AIX support - remove unnecessary dict copy --- psutil/tests/test_system.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'psutil/tests/test_system.py') diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index e93bb6b5..3485fb8f 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -19,6 +19,7 @@ import tempfile import time import psutil +from psutil import AIX from psutil import BSD from psutil import FREEBSD from psutil import LINUX @@ -742,7 +743,8 @@ class TestSystemAPIs(unittest.TestCase): for name in infos._fields: value = getattr(infos, name) self.assertGreaterEqual(value, 0) - if name in ('ctx_switches', 'interrupts'): + # on AIX, ctx_switches is always 0 + if not AIX and name in ('ctx_switches', 'interrupts'): self.assertGreater(value, 0) @unittest.skipIf(not HAS_CPU_FREQ, "not suported") -- cgit v1.2.1 From 988dcd737da2855bc3eb10904f46e6456a664f83 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 12 Nov 2017 01:47:20 +0100 Subject: #1152: (DeviceIOControl), skip disk on ERROR_INVALID_FUNCTION and ERROR_NOT_SUPPORTED --- psutil/tests/test_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'psutil/tests/test_system.py') diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index 3485fb8f..2da4d60d 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -670,7 +670,7 @@ class TestSystemAPIs(unittest.TestCase): @unittest.skipIf(LINUX and not os.path.exists('/proc/diskstats'), '/proc/diskstats not available on this linux version') - @unittest.skipIf(APPVEYOR, "unreliable on APPVEYOR") # no visible disks + # @unittest.skipIf(APPVEYOR, "unreliable on APPVEYOR") # no visible disks def test_disk_io_counters(self): def check_ntuple(nt): self.assertEqual(nt[0], nt.read_count) -- cgit v1.2.1 From d32973d145bd50f22407d4b8d936f1da6be7313c Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 12 Nov 2017 02:23:32 +0100 Subject: re-enable test on appveyor; remove unused C code --- psutil/tests/test_system.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'psutil/tests/test_system.py') diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index 2da4d60d..20b132a9 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -670,7 +670,8 @@ class TestSystemAPIs(unittest.TestCase): @unittest.skipIf(LINUX and not os.path.exists('/proc/diskstats'), '/proc/diskstats not available on this linux version') - # @unittest.skipIf(APPVEYOR, "unreliable on APPVEYOR") # no visible disks + @unittest.skipIf(APPVEYOR and psutil.disk_io_counters() is None, + "unreliable on APPVEYOR") # no visible disks def test_disk_io_counters(self): def check_ntuple(nt): self.assertEqual(nt[0], nt.read_count) @@ -690,6 +691,7 @@ class TestSystemAPIs(unittest.TestCase): assert getattr(nt, name) >= 0, nt ret = psutil.disk_io_counters(perdisk=False) + assert ret is not None, "no disks on this system?" check_ntuple(ret) ret = psutil.disk_io_counters(perdisk=True) # make sure there are no duplicates -- cgit v1.2.1