make sure test process can be killed on windows

This commit is contained in:
NA-Wen 2023-09-14 14:58:25 +08:00
parent 124502530c
commit 0ad26e350d

View File

@ -111,6 +111,8 @@ class ChatEnv:
os.killpg(os.getpgid(process.pid), signal.SIGTERM)
else:
os.kill(process.pid, signal.SIGTERM)
if process.poll() is None:
os.kill(process.pid,signal.CTRL_BREAK_EVENT)
if return_code == 0:
return False, success_info