import pytest


if __name__ == '__main__':
    pytest.main("--pyargs lifelines.tests")

import sys
import pytest


if __name__ == '__main__':
    # Exit with correct code
    sys.exit(pytest.main("--pyargs lifelines.tests"))

Exit with correct error code after tests
Exit with correct error code after tests

Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se>

+ import sys
  import pytest
  
  
  if __name__ == '__main__':
+     # Exit with correct code
-     pytest.main("--pyargs lifelines.tests")
+     sys.exit(pytest.main("--pyargs lifelines.tests"))
  
Exit with correct error code after tests
## Code Before:
import pytest


if __name__ == '__main__':
    pytest.main("--pyargs lifelines.tests")

## Instruction:
Exit with correct error code after tests
## Code After:
import sys
import pytest


if __name__ == '__main__':
    # Exit with correct code
    sys.exit(pytest.main("--pyargs lifelines.tests"))
