From aa9a4f6f9bfaca1dd1d22034d007bbf5d86b9670 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Wed, 19 Oct 2022 02:28:14 +0200 Subject: raise ZombieProcess instead of AccessDenied if process is a zombie --- psutil/tests/test_process.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'psutil/tests/test_process.py') diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index 26869e98..bd31ac66 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -1324,6 +1324,12 @@ class TestProcess(PsutilTestCase): for fun, name in ns.iter(ns.all): succeed_or_zombie_p_exc(fun) + if LINUX: + # TODO: broken + # self.assertRaises(psutil.ZombieProcess, zproc.exe) + self.assertRaises(psutil.ZombieProcess, zproc.cwd) + self.assertRaises(psutil.ZombieProcess, zproc.memory_full_info) + assert psutil.pid_exists(zproc.pid) self.assertIn(zproc.pid, psutil.pids()) self.assertIn(zproc.pid, [x.pid for x in psutil.process_iter()]) -- cgit v1.2.1