Skip to content

Commit c2081f3

Browse files
jet-logicjet-logic
authored andcommitted
winci e.winerror
1 parent c7dc5ed commit c2081f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def kill_pid_3(
138138
if check_pid(pid) is False:
139139
return False
140140
except OSError as e:
141-
if 87 == e.errno: # ERROR_INVALID_PARAMETER (no such process)
141+
if 87 == e.winerror: # ERROR_INVALID_PARAMETER (no such process)
142142
return False
143143
raise
144144
return True
@@ -196,7 +196,7 @@ def test_kill_pid(self):
196196
self.assertFalse(check_pid(victim_proc.pid), f"check_pid {victim_proc.pid}")
197197

198198
# Test killing non-existent process
199-
self.assertFalse(kill_pid(999999), f"kill_pid {victim_proc.pid}")
199+
self.assertFalse(kill_pid(999999), f"kill_pid {999999}")
200200

201201
def test_kill_already_dead(self):
202202
"""Test killing a process that just exited"""

0 commit comments

Comments
 (0)