-
-
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
Close #138 #1467
Close #138 #1467
Conversation
try: | ||
__import__(modname) | ||
except ImportError: | ||
should_skip = True | ||
if should_skip: |
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.
This seems like an unrelated change?
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.
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.
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.
Please add a note/issue about that, it's a unrelated bug wrt traceback filtering
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 I make a separate PR for the issue? Tests won't pass without the fix.
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.
make a issue on the issue tracker and add a link inside a comment of the fix,
then we can sort it out soon
I think this change should target the |
oh, right, good call @roolebo can you please rebase your changes to the features branch |
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:
orDuring 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: