-
-
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
Fixed issue shadowing error when missing argument on teardown_method #1605
Conversation
|
@@ -6,7 +6,8 @@ | |||
* Text documents without any doctests no longer appear as "skipped". | |||
Thanks `@graingert`_ for reporting and providing a full PR (`#1580`_). | |||
|
|||
* | |||
* Fix internal error issue when `method` argument is missing for | |||
`teardown_method`. Fixes (`#1605`). |
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.
Some small ReST issues with this:
- Use double backticks for monospace
- Probably want to drop the parens
- You'll need to add
#1605
to the link list further down
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.
ok, I'm not really used to ReST, got a strong preference for markdown syntax. BTW, I mimicked the syntax around.
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.
should be fixed now
When the method argument is missing on teardown_method, the traceback is 100% internal to pytest, which with default options get pruned. Then that traceback is empty, leading to a new exception as a traceback shall not be empty. This PR fixes that issue by pushing back the last stack on the traceback, when the stacktrace is empty after pruning. Then the output is still pruned, but gives meaningful information with the item where it failed on the stack. * fixes issue pytest-dev#1604 Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
When the method argument is missing on teardown_method, the traceback is
100% internal to pytest, which with default options get pruned. Then
that traceback is empty, leading to a new exception as a traceback shall
not be empty.
This PR fixes that issue by pushing back the last stack on the
traceback, when the stacktrace is empty after pruning. Then the output
is still pruned, but gives meaningful information with the item where it
failed on the stack.
method
argument ofteardown_method
, gettingINTERNALERROR
#1604