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

Close #138 #1467

Closed
wants to merge 4 commits into from
Closed

Close #138 #1467

wants to merge 4 commits into from

Conversation

roolebo
Copy link
Contributor

@roolebo roolebo commented Mar 19, 2016

The change fixes #138. Exception chain is printed according to PEP-3134.
The tracebacks of each exception in the chain are the same as tracebacks of non-chained exceptions in py.test. The tracebacks are delimited by The above exception was the direct cause of the following exception: or During handling of the above exception, another exception occurred: messages, depending on __cause__ or __context__ respectively. If an exception has both __cause__ and __context__, __cause__ takes priority. The messages are yellow-colored as it looks better than cyan delimiters:
yellow-exc-sep
cyan-exc-sep

try:
__import__(modname)
except ImportError:
should_skip = True
if should_skip:
Copy link
Member

Choose a reason for hiding this comment

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

This seems like an unrelated change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A chained exception with context set was raised there. Prior to the changes it was ignored, but when I added processing of exception chain it caused a test failure. IIRC the test failed because the trace back of original exception (ImportError) was filtered and no traceback entries were in the entry list.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a note/issue about that, it's a unrelated bug wrt traceback filtering

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I make a separate PR for the issue? Tests won't pass without the fix.

Copy link
Member

Choose a reason for hiding this comment

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

make a issue on the issue tracker and add a link inside a comment of the fix,
then we can sort it out soon

@nicoddemus
Copy link
Member

I think this change should target the features branch...

@RonnyPfannschmidt
Copy link
Member

oh, right, good call

@roolebo can you please rebase your changes to the features branch

@roolebo roolebo closed this Mar 27, 2016
@roolebo roolebo deleted the fix-issue-138 branch June 6, 2016 15:33
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.

better reporting for python 3.3+ chained exceptions
4 participants