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

Show the mnemonic of pytest.ExitCode in RunResult's repr #6043

Merged
merged 1 commit into from Oct 23, 2019

Conversation

nicoddemus
Copy link
Member

Fix #4901

@@ -370,9 +370,13 @@ def __init__(self, ret, outlines, errlines, duration):
self.duration = duration

def __repr__(self):
try:
ret = pytest.ExitCode(self.ret)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should convert in the ctor instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • try to

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, also changed from:

<RunResult ret=<ExitCode.TESTS_FAILED: 1> len(...

To:

<RunResult ret=ExitCode.TESTS_FAILED len(...

Because I believe it reads better.

@nicoddemus nicoddemus merged commit 20ee883 into pytest-dev:features Oct 23, 2019
@nicoddemus nicoddemus deleted the run-result-exit-code branch October 23, 2019 13:47
@blueyed
Copy link
Contributor

blueyed commented Oct 23, 2019

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants