Skip to content

Commit

Permalink
add win tests related to send_signal(CTRL_C_EVENT) #1227
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Feb 27, 2019
1 parent ed9653a commit 4faef5b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,16 @@ def test_halfway_terminated_process(self):
p.wait()
if WINDOWS:
call_until(psutil.pids, "%s not in ret" % p.pid)
self.assertFalse(p.is_running())
# self.assertFalse(p.pid in psutil.pids(), msg="retcode = %s" %
# retcode)
assert not p.is_running()

if WINDOWS:
with self.assertRaises(psutil.NoSuchProcess):
p.send_signal(signal.CTRL_C_EVENT)
with self.assertRaises(psutil.NoSuchProcess):
p.send_signal(signal.CTRL_BREAK_EVENT)

excluded_names = ['pid', 'is_running', 'wait', 'create_time',
'oneshot', 'memory_info_ex']
'oneshot']
if LINUX and not HAS_RLIMIT:
excluded_names.append('rlimit')
for name in dir(p):
Expand Down

0 comments on commit 4faef5b

Please sign in to comment.