forked from pool/python-psutil
- 809_: [FreeBSD] add support for `Process.rlimit()`. - 893_: [BSD] add support for `Process.environ()` (patch by Armin Gruner) - 1830_: [UNIX] `net_if_stats()`'s `isup` also checks whether the NIC is running (meaning Wi-Fi or ethernet cable is connected). - 1837_: [Linux] improved battery detection and charge "secsleft" calculation - 1620_: [Linux] physical cpu_count() result is incorrect on systems with more than one CPU socket. - 1738_: [macOS] Process.exe() may raise FileNotFoundError if process is still alive but the exe file which launched it got deleted. - 1791_: [macOS] fix missing include for getpagesize(). - 1823_: [Windows] Process.open_files() may cause a segfault due to a NULL pointer. - 1838_: [Linux] sensors_battery(): if `percent` can be determined but not the remaining values, still return a result instead of None. - skip-obs.patch, skip_failing_tests.patch: rediff OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=124
89 lines
3.5 KiB
Diff
89 lines
3.5 KiB
Diff
Index: psutil-5.7.3/psutil/tests/test_misc.py
|
|
===================================================================
|
|
--- psutil-5.7.3.orig/psutil/tests/test_misc.py
|
|
+++ psutil-5.7.3/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):
|
|
Index: psutil-5.7.3/psutil/tests/test_linux.py
|
|
===================================================================
|
|
--- psutil-5.7.3.orig/psutil/tests/test_linux.py
|
|
+++ psutil-5.7.3/psutil/tests/test_linux.py
|
|
@@ -682,7 +682,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)
|
|
@@ -725,7 +725,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'):
|
|
@@ -1080,7 +1080,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):
|
|
@@ -1254,7 +1254,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.3/psutil/tests/test_posix.py
|
|
===================================================================
|
|
--- psutil-5.7.3.orig/psutil/tests/test_posix.py
|
|
+++ psutil-5.7.3/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.3/psutil/tests/test_system.py
|
|
===================================================================
|
|
--- psutil-5.7.3.orig/psutil/tests/test_system.py
|
|
+++ psutil-5.7.3/psutil/tests/test_system.py
|
|
@@ -591,7 +591,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:
|