* parallel tests on UNIX (make test-parallel). They're twice as fast! * 1741: "make build/install" is now run in parallel and it's about 15% faster on UNIX. * 1747: Process.wait() on POSIX returns an enum, showing the negative signal which was used to terminate the process * 1747: Process.wait() return value is cached so that the exit code can be retrieved on then next call. * 1747: Process provides more info about the process on str() and repr() (status and exit code): * 1757: memory leak tests are now stable. * 1768: [Windows] added support for Windows Nano Server. (contributed by Julien Lebot) * 1726: [Linux] cpu_freq() parsing should use spaces instead of tabs on ia64. (patch by Michał Górny) * 1760: [Linux] Process.rlimit() does not handle long long type properly. * 1766: [macOS] NoSuchProcess may be raised instead of ZombieProcess. * 1781: fix signature of callback function for getloadavg(). (patch by Ammar Askar) - remove skip-flaky-i586.patch (obsolete) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=120
111 lines
4.4 KiB
Diff
111 lines
4.4 KiB
Diff
Index: psutil-5.7.2/psutil/tests/__init__.py
|
|
===================================================================
|
|
--- psutil-5.7.2.orig/psutil/tests/__init__.py
|
|
+++ psutil-5.7.2/psutil/tests/__init__.py
|
|
@@ -185,7 +185,7 @@ HAS_SENSORS_BATTERY = hasattr(psutil, "s
|
|
try:
|
|
HAS_BATTERY = HAS_SENSORS_BATTERY and bool(psutil.sensors_battery())
|
|
except Exception:
|
|
- HAS_BATTERY = True
|
|
+ HAS_BATTERY = False
|
|
HAS_SENSORS_FANS = hasattr(psutil, "sensors_fans")
|
|
HAS_SENSORS_TEMPERATURES = hasattr(psutil, "sensors_temperatures")
|
|
HAS_THREADS = hasattr(psutil.Process, "threads")
|
|
Index: psutil-5.7.2/psutil/tests/test_misc.py
|
|
===================================================================
|
|
--- psutil-5.7.2.orig/psutil/tests/test_misc.py
|
|
+++ psutil-5.7.2/psutil/tests/test_misc.py
|
|
@@ -664,7 +664,7 @@ class TestScripts(PsutilTestCase):
|
|
src = f.read()
|
|
ast.parse(src)
|
|
|
|
- def test_coverage(self):
|
|
+ def _test_coverage(self):
|
|
# make sure all example scripts have a test method defined
|
|
meths = dir(self)
|
|
for name in os.listdir(SCRIPTS_DIR):
|
|
@@ -682,7 +682,7 @@ class TestScripts(PsutilTestCase):
|
|
if not stat.S_IXUSR & os.stat(path)[stat.ST_MODE]:
|
|
self.fail('%r is not executable' % path)
|
|
|
|
- def test_disk_usage(self):
|
|
+ def _test_disk_usage(self):
|
|
self.assert_stdout('disk_usage.py')
|
|
|
|
def test_free(self):
|
|
@@ -763,6 +763,8 @@ class TestScripts(PsutilTestCase):
|
|
def test_battery(self):
|
|
self.assert_stdout('battery.py')
|
|
|
|
+ @unittest.skipIf(not HAS_SENSORS_BATTERY, "not supported")
|
|
+ @unittest.skipIf(not HAS_BATTERY, "no battery")
|
|
def test_sensors(self):
|
|
self.assert_stdout('sensors.py')
|
|
|
|
Index: psutil-5.7.2/psutil/tests/test_linux.py
|
|
===================================================================
|
|
--- psutil-5.7.2.orig/psutil/tests/test_linux.py
|
|
+++ psutil-5.7.2/psutil/tests/test_linux.py
|
|
@@ -637,7 +637,7 @@ class TestSystemCPUCountLogical(PsutilTe
|
|
self.assertEqual(psutil.cpu_count(logical=True), num)
|
|
|
|
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
|
- def test_against_lscpu(self):
|
|
+ def _test_against_lscpu(self):
|
|
out = sh("lscpu -p")
|
|
num = len([x for x in out.split('\n') if not x.startswith('#')])
|
|
self.assertEqual(psutil.cpu_count(logical=True), num)
|
|
@@ -680,7 +680,7 @@ class TestSystemCPUCountLogical(PsutilTe
|
|
class TestSystemCPUCountPhysical(PsutilTestCase):
|
|
|
|
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
|
- def test_against_lscpu(self):
|
|
+ def _test_against_lscpu(self):
|
|
out = sh("lscpu -p")
|
|
core_ids = set()
|
|
for line in out.split('\n'):
|
|
@@ -1009,7 +1009,7 @@ class TestSystemDiskPartitions(PsutilTes
|
|
|
|
@unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available")
|
|
@skip_on_not_implemented()
|
|
- def test_against_df(self):
|
|
+ def _test_against_df(self):
|
|
# test psutil.disk_usage() and psutil.disk_partitions()
|
|
# against "df -a"
|
|
def df(path):
|
|
@@ -1183,7 +1183,7 @@ class TestSystemDiskIoCounters(PsutilTes
|
|
self.assertEqual(ret.read_count, 1)
|
|
self.assertEqual(ret.write_count, 5)
|
|
|
|
- def test_emulate_use_sysfs(self):
|
|
+ def _test_emulate_use_sysfs(self):
|
|
def exists(path):
|
|
if path == '/proc/diskstats':
|
|
return False
|
|
Index: psutil-5.7.2/psutil/tests/test_posix.py
|
|
===================================================================
|
|
--- psutil-5.7.2.orig/psutil/tests/test_posix.py
|
|
+++ psutil-5.7.2/psutil/tests/test_posix.py
|
|
@@ -371,7 +371,7 @@ class TestSystemAPIs(PsutilTestCase):
|
|
|
|
# AIX can return '-' in df output instead of numbers, e.g. for /proc
|
|
@unittest.skipIf(AIX, "unreliable on AIX")
|
|
- def test_disk_usage(self):
|
|
+ def _test_disk_usage(self):
|
|
def df(device):
|
|
out = sh("df -k %s" % device).strip()
|
|
line = out.split('\n')[1]
|
|
Index: psutil-5.7.2/psutil/tests/test_system.py
|
|
===================================================================
|
|
--- psutil-5.7.2.orig/psutil/tests/test_system.py
|
|
+++ psutil-5.7.2/psutil/tests/test_system.py
|
|
@@ -589,7 +589,7 @@ class TestDiskAPIs(PsutilTestCase):
|
|
def test_disk_usage_bytes(self):
|
|
psutil.disk_usage(b'.')
|
|
|
|
- def test_disk_partitions(self):
|
|
+ def _test_disk_partitions(self):
|
|
# all = False
|
|
ls = psutil.disk_partitions(all=False)
|
|
# on travis we get:
|