pytest-dev / pytest-timeout

MIT License
213 stars 64 forks source link

gracefully exit the program #138

Closed wzhy920127 closed 2 years ago

wzhy920127 commented 2 years ago

https://github.com/pytest-dev/pytest-timeout/blob/7d4c413a6344edd8340628354419a324e68c6cb7/pytest_timeout.py#L440 Why not use sys.exit() to exit the program? It can exit normally without affecting subsequent cases.

flub commented 2 years ago

The aim is to give as much guarantee as possible that the process will terminate. A plain sys.exit() does allow too many ways for the process to still not exit.