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

Merged
merged 1 commit into from Jun 12, 2016

Conversation

Projects
None yet
4 participants
@guyzmo
Contributor

guyzmo commented Jun 11, 2016

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.

@guyzmo

This comment has been minimized.

Contributor

guyzmo commented Jun 11, 2016

  • Target: for bug or doc fixes, target master; for new features, target features
  • Make sure to include one or more tests for your change
  • Add yourself to AUTHORS
  • Add a new entry to the CHANGELOG (choose any open position to avoid merge conflicts with other PRs)
@coveralls

This comment has been minimized.

coveralls commented Jun 11, 2016

Coverage Status

Coverage decreased (-0.009%) to 92.203% when pulling fc7c104 on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

@coveralls

This comment has been minimized.

coveralls commented Jun 11, 2016

Coverage Status

Coverage decreased (-0.009%) to 92.203% when pulling fc7c104 on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

@coveralls

This comment has been minimized.

coveralls commented Jun 11, 2016

Coverage Status

Coverage increased (+0.003%) to 92.214% when pulling 36adf00 on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

@coveralls

This comment has been minimized.

coveralls commented Jun 11, 2016

Coverage Status

Coverage increased (+0.003%) to 92.214% when pulling b844bef on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

@@ -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`).

This comment has been minimized.

@The-Compiler

The-Compiler Jun 11, 2016

Member

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

This comment has been minimized.

@guyzmo

guyzmo Jun 11, 2016

Contributor

ok, I'm not really used to ReST, got a strong preference for markdown syntax. BTW, I mimicked the syntax around.

This comment has been minimized.

@guyzmo

guyzmo Jun 11, 2016

Contributor

should be fixed now

@coveralls

This comment has been minimized.

coveralls commented Jun 11, 2016

Coverage Status

Coverage increased (+0.003%) to 92.214% when pulling bbd8986 on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

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 #1604

Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
@coveralls

This comment has been minimized.

coveralls commented Jun 12, 2016

Coverage Status

Coverage increased (+0.003%) to 92.214% when pulling accd962 on guyzmo:issue/1604 into 577cce2 on pytest-dev:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment