forked from pool/python-psutil
* 669_, [Windows]: `net_if_addrs()`_ also returns the broadcast
address instead of None.
* 2480_: Python 2.7 is no longer supported. Latest version
supporting Python 2.7 is psutil 6.1.X. Install it with: pip2
install psutil==6.1.*.
* 2490_: removed long deprecated Process.memory_info_ex()
method. It was deprecated in psutil 4.0.0, released 8 years
ago. Substitute is Process.memory_full_info().
* 2496_, [Linux]: Avoid segfault (a cPython bug) on
Process.memory_maps() for processes that use hundreds of GBs
of memory.
* 2502_, [macOS]: `virtual_memory()`_ now relies on
host_statistics64 instead of host_statistics. This is the
same approach used by vm_stat CLI tool, and should grant more
accurate results.
* 2480_: Python 2.7 is no longer supported.
* 2490_: removed long deprecated Process.memory_info_ex()
method.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=179
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)
|