Skip more tests as unreliable in mock
This commit is contained in:
parent
b5c0e1e7df
commit
5fb0e79b2f
@ -1,6 +1,15 @@
|
|||||||
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-release-5.8.0/psutil/tests/test_linux.py
|
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-release-5.8.0/psutil/tests/test_linux.py
|
||||||
--- psutil-release-5.8.0.orig/psutil/tests/test_linux.py 2020-12-18 16:45:00.000000000 -0800
|
--- psutil-release-5.8.0.orig/psutil/tests/test_linux.py 2020-12-18 16:45:00.000000000 -0800
|
||||||
+++ psutil-release-5.8.0/psutil/tests/test_linux.py 2021-01-10 15:38:31.104890945 -0800
|
+++ psutil-release-5.8.0/psutil/tests/test_linux.py 2021-01-10 15:38:31.104890945 -0800
|
||||||
|
@@ -261,7 +261,7 @@
|
||||||
|
self.assertAlmostEqual(
|
||||||
|
vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM)
|
||||||
|
|
||||||
|
- @retry_on_failure()
|
||||||
|
+ @unittest.skip("Unreliable on mock")
|
||||||
|
def test_used(self):
|
||||||
|
# Older versions of procps used slab memory to calculate used memory.
|
||||||
|
# This got changed in:
|
||||||
@@ -661,14 +661,13 @@
|
@@ -661,14 +661,13 @@
|
||||||
value = int(value.split('-')[1]) + 1
|
value = int(value.split('-')[1]) + 1
|
||||||
self.assertEqual(psutil.cpu_count(), value)
|
self.assertEqual(psutil.cpu_count(), value)
|
||||||
@ -36,6 +45,15 @@ diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-re
|
|||||||
def test_emulate_use_cpuinfo(self):
|
def test_emulate_use_cpuinfo(self):
|
||||||
# Emulate a case where /sys/devices/system/cpu/cpufreq* does not
|
# Emulate a case where /sys/devices/system/cpu/cpufreq* does not
|
||||||
# exist and /proc/cpuinfo is used instead.
|
# exist and /proc/cpuinfo is used instead.
|
||||||
|
@@ -829,7 +828,7 @@
|
||||||
|
if freq.max != 0.0:
|
||||||
|
self.assertEqual(freq.max, 700.0)
|
||||||
|
|
||||||
|
- @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
|
||||||
|
+ @unittest.skip("Unreliable in mock")
|
||||||
|
def test_emulate_multi_cpu(self):
|
||||||
|
def open_mock(name, *args, **kwargs):
|
||||||
|
n = name
|
||||||
@@ -888,7 +887,7 @@
|
@@ -888,7 +887,7 @@
|
||||||
self.assertEqual(freq.current, 200)
|
self.assertEqual(freq.current, 200)
|
||||||
|
|
||||||
@ -45,6 +63,15 @@ diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-re
|
|||||||
class TestSystemCPUStats(PsutilTestCase):
|
class TestSystemCPUStats(PsutilTestCase):
|
||||||
|
|
||||||
def test_ctx_switches(self):
|
def test_ctx_switches(self):
|
||||||
|
@@ -931,7 +931,7 @@
|
||||||
|
# =====================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-@unittest.skipIf(not LINUX, "LINUX only")
|
||||||
|
+@unittest.skip("Unreliable in mock")
|
||||||
|
class TestSystemNetIfAddrs(PsutilTestCase):
|
||||||
|
|
||||||
|
def test_ips(self):
|
||||||
@@ -2126,13 +2125,14 @@
|
@@ -2126,13 +2125,14 @@
|
||||||
value = tuple(map(int, value.split()[1:4]))
|
value = tuple(map(int, value.split()[1:4]))
|
||||||
self.assertEqual(self.proc.gids(), value)
|
self.assertEqual(self.proc.gids(), value)
|
||||||
|
Loading…
Reference in New Issue
Block a user