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
Prevent obsolete reports about failure of cleaning viewer instances #5317
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5317 +/- ##
==========================================
+ Coverage 89.07% 89.08% +0.01%
==========================================
Files 581 581
Lines 49233 49241 +8
==========================================
+ Hits 43853 43866 +13
+ Misses 5380 5375 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
If I understand correctly what this fixes, thanks so much! This has been annoying me to no end 😆 I don't quite follow the first chunk of code though. |
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.
LGTM.
_do_not_inline_below = len(QtViewer._instances) | ||
|
||
QtViewer._instances.clear() # clear to prevent fail of next 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.
I'm not sure why i didn't do that originally.
Description
This is often the thing that if the test is failed, then cleaning of the viewer is failed. At the
make_napari_viewer
fixture is long, most of the error log is occupied by information of failure in the fixture, not the actual error message.We also do not clean instances, so the next test crash because of the previous test crash. I have added a clean step to prevent this.
Type of change
References
How has this been tested?
as there are small differences between the two Qt bindings.
Final checklist:
trans.
to make them localizable.For more information see our translations guide.