forked from pool/python-psutil
* 2366_, [Windows]: drastically speedup `process_iter()`_. We
now determine process unique identity by using process "fast"
create time method. This will considerably speedup those apps
which use `process_iter()`_ only once, e.g. to look for a
process with a certain name.
* 2446_: use pytest instead of unittest.
* 2448_: add make install-sysdeps target to install the
necessary system dependencies (python-dev, gcc, etc.) on all
supported UNIX flavors.
* 2449_: add make install-pydeps-test and make install-pydeps-
dev targets. They can be used to install dependencies meant
for running tests and for local development. They can also be
installed via pip install .[test] and pip install .[dev].
* 2456_: allow to run tests via python3 -m psutil.tests even if
pytest module is not installed. This is useful for production
environments that don't have pytest installed, but still want
to be able to test psutil installation.
* 2427_: psutil (segfault) on import in the free-threaded (no
GIL) version of Python 3.13. (patch by Sam Gross)
* 2455_, [Linux]: IndexError may occur when reading
/proc/pid/stat and field 40 (blkio_ticks) is missing.
* 2457_, [AIX]: significantly improve the speed of
`Process.open_files()`_ for some edge cases.
* 2460_, [OpenBSD]: `Process.num_fds()`_ and
`Process.open_files()`_ may fail with `NoSuchProcess`_ for
PID 0. Instead, we now return "null" values (0 and []
respectively).
- drop skip_failing_tests.patch: obsolete
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=175
57 lines
2.5 KiB
Diff
57 lines
2.5 KiB
Diff
---
|
|
psutil/tests/test_process.py | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
Index: psutil-5.9.6/psutil/tests/test_process.py
|
|
===================================================================
|
|
--- psutil-5.9.6.orig/psutil/tests/test_process.py
|
|
+++ psutil-5.9.6/psutil/tests/test_process.py
|
|
@@ -419,6 +419,7 @@ class TestProcess(PsutilTestCase):
|
|
p.ionice(init)
|
|
|
|
@unittest.skipIf(not HAS_RLIMIT, "not supported")
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_rlimit_get(self):
|
|
import resource
|
|
p = psutil.Process(os.getpid())
|
|
@@ -442,6 +443,7 @@ class TestProcess(PsutilTestCase):
|
|
self.assertGreaterEqual(ret[1], -1)
|
|
|
|
@unittest.skipIf(not HAS_RLIMIT, "not supported")
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_rlimit_set(self):
|
|
p = self.spawn_psproc()
|
|
p.rlimit(psutil.RLIMIT_NOFILE, (5, 5))
|
|
@@ -455,6 +457,7 @@ class TestProcess(PsutilTestCase):
|
|
p.rlimit(psutil.RLIMIT_NOFILE, (5, 5, 5))
|
|
|
|
@unittest.skipIf(not HAS_RLIMIT, "not supported")
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_rlimit(self):
|
|
p = psutil.Process()
|
|
testfn = self.get_testfn()
|
|
@@ -475,6 +478,7 @@ class TestProcess(PsutilTestCase):
|
|
self.assertEqual(p.rlimit(psutil.RLIMIT_FSIZE), (soft, hard))
|
|
|
|
@unittest.skipIf(not HAS_RLIMIT, "not supported")
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_rlimit_infinity(self):
|
|
# First set a limit, then re-set it by specifying INFINITY
|
|
# and assume we overridden the previous limit.
|
|
@@ -490,6 +494,7 @@ class TestProcess(PsutilTestCase):
|
|
self.assertEqual(p.rlimit(psutil.RLIMIT_FSIZE), (soft, hard))
|
|
|
|
@unittest.skipIf(not HAS_RLIMIT, "not supported")
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_rlimit_infinity_value(self):
|
|
# RLIMIT_FSIZE should be RLIM_INFINITY, which will be a really
|
|
# big number on a platform with large file support. On these
|
|
@@ -1303,6 +1308,7 @@ class TestProcess(PsutilTestCase):
|
|
assert_raises_nsp(fun, name)
|
|
|
|
@unittest.skipIf(not POSIX, 'POSIX only')
|
|
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
|
|
def test_zombie_process(self):
|
|
parent, zombie = self.spawn_zombie()
|
|
self.assertProcessZombie(zombie)
|