Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make exit statuses public API #5125

Closed
blueyed opened this issue Apr 15, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@blueyed
Copy link
Contributor

commented Apr 15, 2019

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.

@RonnyPfannschmidt

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Enum

@Zac-HD

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

enum.IntEnum is definitely the way to go here 😄

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

This is even easier now that we have dropped 2.7/3.4 from master. 😁

@RonnyPfannschmidt RonnyPfannschmidt self-assigned this Jun 7, 2019

@RonnyPfannschmidt RonnyPfannschmidt removed their assignment Jun 14, 2019

RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jun 17, 2019

nicoddemus added a commit that referenced this issue Jun 17, 2019

fix typos in the resolution of #5125 (#5458)
fix typos in the resolution of #5125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.