-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Issue 1316 - longrepr is a string when pytrace=False #7100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CarycaKatarzyna for tackling this very old issue! 👍
Please take a look at my comments.
Rebased to fix linting. Thanks a lot @CarycaKatarzyna! |
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
We should squash all commits on merge btw. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1 @@ | |||
``TestReport.longrepr`` is now always an instance of ``ReprExceptionInfo``. Previously it was a ``str`` when a test failed with ``pytest.fail(..., pytrace=False)``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``TestReport.longrepr`` is now always an instance of ``ReprExceptionInfo``. Previously it was a ``str`` when a test failed with ``pytest.fail(..., pytrace=False)``. | |
``TestReport.longrepr`` is now always an instance of ``ReprExceptionInfo``. Previously it was an ``str`` when a test failed with ``pytest.fail(..., pytrace=False)``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str
starts with 's' which is a consonant. Why do you think that 'an' is a proper spelling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read it as ESS-TEE-ARR, but maybe others don't. Not a big deal either way :)
Co-authored-by: Ran Benita <ran@unusedvar.com>
Thanks @CarycaKatarzyna! |
This pull request fixes #1316. I've added new
_TracebackStyle
-no_pytrace
. For that styleReprExceptionInfo
has as few information as possible. For examplereport.longrepr.chain
isfor code contained in issue #1316.