-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Silhouette Plot: handling memory error #2336
Conversation
self.assertFalse(self.widget.Error.memory_error.is_shown()) | ||
with unittest.mock.patch( | ||
"numpy.asarray", | ||
side_effect=MemoryError): |
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.
Can you test this without mocking?
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?
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.
So that we see the exception is caught. Which is not the case if such an exception state arises in e.g. an unguarded C code.
self.assertFalse(self.widget.Error.memory_error.is_shown()) | ||
with unittest.mock.patch( | ||
"numpy.asarray", | ||
side_effect=MemoryError): |
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?
GH-2336 | ||
""" | ||
from Orange.data import Table | ||
import unittest |
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 local imports?
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.
Forgotten to move those two lines up.
Codecov Report
@@ Coverage Diff @@
## master #2336 +/- ##
==========================================
+ Coverage 73.36% 73.36% +<.01%
==========================================
Files 317 317
Lines 55586 55607 +21
==========================================
+ Hits 40778 40797 +19
- Misses 14808 14810 +2 |
Issue
Memory error.
Description of changes
Includes