-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Prevent hiding underlying exception when ConfTestImportFailure is raised #7244
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
Conversation
Hey @DahlitzFlorian github is having some issue(s) right now which explains the fetch failures on CI :) |
elif isinstance(excinfo.value, ConftestImportFailure): | ||
# A config.ConftestImportFailure is not useful for post_mortem. | ||
# Use the underlying exception instead: | ||
return excinfo.value.excinfo[2] |
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.
nice! that was easy -- is there a way to demo this in a test?
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.
Thanks for the fast feedback! Oh yeah, I will try to write a test for this today.
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 take a look at test_debugging.py
, there are tests there which interact with pdb directly. 👍
Finally, I got a working test, which actually does test the change I submitted - never mind writing the test would be harder than the actual 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.
[5.4.x] Merge pull request #7244 from DahlitzFlorian/fix-issue-7150
@asottile the PR I mentioned in #7150. Let me know if I missed something. Thanks for your patience and your help on this, I really appreciate it!
changelog
folder, with a name like<ISSUE NUMBER>.<TYPE>.rst
AUTHORS
in alphabetical order (was done in PR Add note about --strict and --strict-markers to references #7240 and approved, but not yet merged)