Skip to content

Commit d8af14f

Browse files
committed
Ensure ProcessLookupError is raised when waiting for killed process
1 parent ea5a376 commit d8af14f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,11 +607,8 @@ async def kill_running():
607607

608608
# kill the process (but asyncio is not notified immediately)
609609
proc.kill()
610-
try:
610+
with self.assertRaises(ProcessLookupError):
611611
proc.wait()
612-
except ProcessLookupError:
613-
# Process already exited, which is expected
614-
pass
615612

616613
proc.kill = mock.Mock()
617614
proc_returncode = proc.poll()

0 commit comments

Comments
 (0)