|
|
b24769 |
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-release-5.8.0/psutil/tests/test_linux.py
|
|
|
b24769 |
--- psutil-release-5.8.0.orig/psutil/tests/test_linux.py 2020-12-18 16:45:00.000000000 -0800
|
|
|
b24769 |
+++ psutil-release-5.8.0/psutil/tests/test_linux.py 2021-01-10 15:38:31.104890945 -0800
|
|
|
b24769 |
@@ -661,14 +661,13 @@
|
|
|
b24769 |
value = int(value.split('-')[1]) + 1
|
|
|
b24769 |
self.assertEqual(psutil.cpu_count(), value)
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not os.path.exists("/sys/devices/system/cpu"),
|
|
|
b24769 |
- "/sys/devices/system/cpu does not exist")
|
|
|
b24769 |
+ @unittest.skip("Unreliable on mock")
|
|
|
b24769 |
def test_against_sysdev_cpu_num(self):
|
|
|
b24769 |
ls = os.listdir("/sys/devices/system/cpu")
|
|
|
b24769 |
count = len([x for x in ls if re.search(r"cpu\d+$", x) is not None])
|
|
|
b24769 |
self.assertEqual(psutil.cpu_count(), count)
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not which("nproc"), "nproc utility not available")
|
|
|
b24769 |
+ @unittest.skip("Unreliable on mock")
|
|
|
b24769 |
def test_against_nproc(self):
|
|
|
b24769 |
num = int(sh("nproc --all"))
|
|
|
b24769 |
self.assertEqual(psutil.cpu_count(logical=True), num)
|
|
|
b24769 |
@@ -713,7 +712,7 @@
|
|
|
b24769 |
m.called
|
|
|
b24769 |
|
|
|
b24769 |
|
|
|
b24769 |
-@unittest.skipIf(not LINUX, "LINUX only")
|
|
|
b24769 |
+@unittest.skip("Unreliable in mock")
|
|
|
b24769 |
class TestSystemCPUCountPhysical(PsutilTestCase):
|
|
|
b24769 |
|
|
|
b24769 |
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
|
|
b24769 |
@@ -745,7 +744,7 @@
|
|
|
b24769 |
@unittest.skipIf(not LINUX, "LINUX only")
|
|
|
b24769 |
class TestSystemCPUFrequency(PsutilTestCase):
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_emulate_use_second_file(self):
|
|
|
b24769 |
# https://github.com/giampaolo/psutil/issues/981
|
|
|
b24769 |
def path_exists_mock(path):
|
|
|
b24769 |
@@ -759,7 +758,7 @@
|
|
|
b24769 |
create=True):
|
|
|
b24769 |
assert psutil.cpu_freq()
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_emulate_use_cpuinfo(self):
|
|
|
b24769 |
# Emulate a case where /sys/devices/system/cpu/cpufreq* does not
|
|
|
b24769 |
# exist and /proc/cpuinfo is used instead.
|
|
|
b24769 |
@@ -888,7 +887,7 @@
|
|
|
b24769 |
self.assertEqual(freq.current, 200)
|
|
|
b24769 |
|
|
|
b24769 |
|
|
|
b24769 |
-@unittest.skipIf(not LINUX, "LINUX only")
|
|
|
b24769 |
+@unittest.skip("Unreliable in mock")
|
|
|
b24769 |
class TestSystemCPUStats(PsutilTestCase):
|
|
|
b24769 |
|
|
|
b24769 |
def test_ctx_switches(self):
|
|
|
b24769 |
@@ -2126,13 +2125,14 @@
|
|
|
b24769 |
value = tuple(map(int, value.split()[1:4]))
|
|
|
b24769 |
self.assertEqual(self.proc.gids(), value)
|
|
|
b24769 |
|
|
|
b24769 |
- @retry_on_failure()
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_num_ctx_switches(self):
|
|
|
b24769 |
value = self.read_status_file("voluntary_ctxt_switches:")
|
|
|
b24769 |
self.assertEqual(self.proc.num_ctx_switches().voluntary, value)
|
|
|
b24769 |
value = self.read_status_file("nonvoluntary_ctxt_switches:")
|
|
|
b24769 |
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
|
|
|
b24769 |
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_cpu_affinity(self):
|
|
|
b24769 |
value = self.read_status_file("Cpus_allowed_list:")
|
|
|
b24769 |
if '-' in str(value):
|
|
|
b24769 |
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_misc.py psutil-release-5.8.0/psutil/tests/test_misc.py
|
|
|
b24769 |
--- psutil-release-5.8.0.orig/psutil/tests/test_misc.py 2020-12-18 16:45:00.000000000 -0800
|
|
|
b24769 |
+++ psutil-release-5.8.0/psutil/tests/test_misc.py 2021-01-10 15:38:31.104890945 -0800
|
|
|
b24769 |
@@ -355,7 +355,7 @@
|
|
|
b24769 |
|
|
|
b24769 |
def test_setup_script(self):
|
|
|
b24769 |
setup_py = os.path.join(ROOT_DIR, 'setup.py')
|
|
|
b24769 |
- if CI_TESTING and not os.path.exists(setup_py):
|
|
|
b24769 |
+ if not os.path.exists(setup_py):
|
|
|
b24769 |
return self.skipTest("can't find setup.py")
|
|
|
b24769 |
module = import_module_by_path(setup_py)
|
|
|
b24769 |
self.assertRaises(SystemExit, module.setup)
|
|
|
b24769 |
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_system.py psutil-release-5.8.0/psutil/tests/test_system.py
|
|
|
b24769 |
--- psutil-release-5.8.0.orig/psutil/tests/test_system.py 2020-12-18 16:45:00.000000000 -0800
|
|
|
b24769 |
+++ psutil-release-5.8.0/psutil/tests/test_system.py 2021-01-10 15:38:31.105890946 -0800
|
|
|
b24769 |
@@ -198,7 +198,7 @@
|
|
|
b24769 |
self.assertGreater(bt, 0)
|
|
|
b24769 |
self.assertLess(bt, time.time())
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
|
|
|
b24769 |
+ @unittest.skipIf(not psutil.users(), "unreliable on CI")
|
|
|
b24769 |
def test_users(self):
|
|
|
b24769 |
users = psutil.users()
|
|
|
b24769 |
self.assertNotEqual(users, [])
|
|
|
b24769 |
@@ -510,7 +510,7 @@
|
|
|
b24769 |
if not AIX and name in ('ctx_switches', 'interrupts'):
|
|
|
b24769 |
self.assertGreater(value, 0)
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not HAS_CPU_FREQ, "not suported")
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_cpu_freq(self):
|
|
|
b24769 |
def check_ls(ls):
|
|
|
b24769 |
for nt in ls:
|
|
|
b24769 |
@@ -579,6 +579,7 @@
|
|
|
b24769 |
def test_disk_usage_bytes(self):
|
|
|
b24769 |
psutil.disk_usage(b'.')
|
|
|
b24769 |
|
|
|
b24769 |
+ @unittest.skip("unreliable on CI")
|
|
|
b24769 |
def test_disk_partitions(self):
|
|
|
b24769 |
def check_ntuple(nt):
|
|
|
b24769 |
self.assertIsInstance(nt.device, str)
|
|
|
b24769 |
@@ -828,7 +829,7 @@
|
|
|
b24769 |
|
|
|
b24769 |
class TestSensorsAPIs(PsutilTestCase):
|
|
|
b24769 |
|
|
|
b24769 |
- @unittest.skipIf(not HAS_SENSORS_TEMPERATURES, "not supported")
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_sensors_temperatures(self):
|
|
|
b24769 |
temps = psutil.sensors_temperatures()
|
|
|
b24769 |
for name, entries in temps.items():
|
|
|
b24769 |
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_testutils.py psutil-release-5.8.0/psutil/tests/test_testutils.py
|
|
|
b24769 |
--- psutil-release-5.8.0.orig/psutil/tests/test_testutils.py 2020-12-18 16:45:00.000000000 -0800
|
|
|
b24769 |
+++ psutil-release-5.8.0/psutil/tests/test_testutils.py 2021-01-10 15:48:14.240695423 -0800
|
|
|
b24769 |
@@ -364,7 +364,7 @@
|
|
|
b24769 |
self.assertRaises(ValueError, self.execute, lambda: 0, retries=-1)
|
|
|
b24769 |
|
|
|
b24769 |
@retry_on_failure()
|
|
|
b24769 |
- @unittest.skipIf(CI_TESTING, "skipped on CI")
|
|
|
b24769 |
+ @unittest.skip("Unreliable in mock")
|
|
|
b24769 |
def test_leak_mem(self):
|
|
|
b24769 |
ls = []
|
|
|
b24769 |
|