-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
I have just noticed that I have been calling pytest.main()
for years in several projects and ignored the exit code. This is obviously really bad for unit tests; the only reason I have not noticed is that I have used the python -m pytest
invocation method in CI -- until today.
The problem, in my opinion, is that the one example in the documentation ignores the exit code as well. It does mention that the function returns the exit code but giving an example where that code is used would be more explicit. For example:
if __name__ == '__main__':
sys.exit(pytest.main(sys.argv))
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification