-
-
Notifications
You must be signed in to change notification settings - Fork 70
Setup/teardown exception capturing as early/late as possible to catch all exceptions #108
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
pytestqt/exceptions.py
Outdated
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.
Why not simply:
exceptions = self.exceptions
self.exceptions = []here?
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.
Of course! 😅
Done
|
Looks great apart from the things I commented on! It doesn't fix #106 though - I added a comment there to clear things up hopefully. With this, I can finally develop complex fixtures without getting an |
|
Implemented the changes we talked about. Could you please test the new commits again? Thanks! |
|
Yay, thanks again! I'll test and merge this either later today or tomorrow. |
|
Nice, thanks! |
pytestqt/plugin.py
Outdated
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 is also 2.8 specific 😉
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.
Ooops. 😅
|
Looks good now, and fixes the issues I've had 👍 I think I'll give #107 a quick try on my way home (unless you want to), and after that, what do you think about a release? |
Setup/teardown exception capturing as early/late as possible to catch all exceptions
Please go ahead with #107, thanks! 😄 I would like to address pytest-dev/pytest-mock#22 as well into |
Now exception capturing is setup as early as possible, and disabled as late as possible. Also, this new approach allows us to distinguish exceptions captured during setup/call/teardown, which provides a more friendly message when the exception occurred inside the test call (as opposed during
qtbot's teardown).Fixes #105
Fixes #106