Prevent hiding underlying exception when ConfTestImportFailure is raised#7244
Merged
asottile merged 2 commits intopytest-dev:masterfrom May 23, 2020
Merged
Prevent hiding underlying exception when ConfTestImportFailure is raised#7244asottile merged 2 commits intopytest-dev:masterfrom
asottile merged 2 commits intopytest-dev:masterfrom
Conversation
Member
|
Hey @DahlitzFlorian github is having some issue(s) right now which explains the fetch failures on CI :) |
asottile
reviewed
May 22, 2020
| elif isinstance(excinfo.value, ConftestImportFailure): | ||
| # A config.ConftestImportFailure is not useful for post_mortem. | ||
| # Use the underlying exception instead: | ||
| return excinfo.value.excinfo[2] |
Member
There was a problem hiding this comment.
nice! that was easy -- is there a way to demo this in a test?
Member
Author
There was a problem hiding this comment.
Thanks for the fast feedback! Oh yeah, I will try to write a test for this today.
Member
There was a problem hiding this comment.
Please take a look at test_debugging.py, there are tests there which interact with pdb directly. 👍
Member
Author
|
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. |
asottile
added a commit
that referenced
this pull request
May 23, 2020
[5.4.x] Merge pull request #7244 from DahlitzFlorian/fix-issue-7150
4 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

@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!
changelogfolder, with a name like<ISSUE NUMBER>.<TYPE>.rstAUTHORSin alphabetical order (was done in PR Add note about --strict and --strict-markers to references #7240 and approved, but not yet merged)