Exit pytest test session with custom exit code in different scenarios
https://pypi.org/project/pytest-custom-exit-code/