forked from pytest-dev/pytest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue shadowing error when missing argument on teardown_method
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>
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,4 @@ Thomas Grainger | |
Tom Viner | ||
Trevor Bekolay | ||
Wouter van Ackooy | ||
Bernard Pratz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters