Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Aug 2, 2023
1 parent 72ae660 commit 2aa02a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ XXXX-XX-XX
- 2284_, [Linux]: `memory_full_info`_ may incorrectly raise `ZombieProcess`_
if it's determined via ``/proc/pid/smaps_rollup``. Instead we now fallback on
reading ``/proc/pid/smaps``.
- 2288_, [Linux]: correctly raise `ZombieProcess`_ on `exe`_, `cmdline`_ and
`memory_maps`_ instead of returning a "null" value.

5.9.5
=====
Expand Down
13 changes: 5 additions & 8 deletions psutil/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,14 +980,11 @@ def assertProcessZombie(self, proc):
fun()
except (psutil.ZombieProcess, psutil.AccessDenied):
pass
# Make sure getters does not return 'null' values.
for fun, name in ns.iter(ns.getters):
with self.subTest(name):
try:
retval = fun()
self.assertNotIn(retval, ("", None, []))
except (psutil.ZombieProcess, psutil.AccessDenied):
pass
if LINUX:
# https://github.com/giampaolo/psutil/pull/2288
self.assertRaises(psutil.ZombieProcess, proc.cmdline)
self.assertRaises(psutil.ZombieProcess, proc.exe)
self.assertRaises(psutil.ZombieProcess, proc.memory_maps)
# Zombie cannot be signaled or terminated.
proc.suspend()
proc.resume()
Expand Down

0 comments on commit 2aa02a5

Please sign in to comment.