Skip to content

Make exit statuses public API #5125

@blueyed

Description

@blueyed

Currently they are defined in _pytest.main: https://github.com/blueyed/pytest/blob/526e64ec642bd34db7803d8c03b4b1b05350fc57/src/_pytest/main.py#L27-L33

It might make sense to move them to Session, which allows to use them more easily in hooks with a session also (e.g. pytest_sessiofinish).

Related: #4901 - so it might make sense to use a class based on int, with a custom repr/str for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branchtype: refactoringinternal improvements to the code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions