-
-
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] Test & Learn: handling memory error #2316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2316 +/- ##
==========================================
+ Coverage 73.24% 73.29% +0.05%
==========================================
Files 317 317
Lines 55366 55396 +30
==========================================
+ Hits 40553 40604 +51
+ Misses 14813 14792 -21 |
self.send_signal("Data", data) | ||
self.assertFalse(self.widget.Error.memory_error.is_shown()) | ||
|
||
with unittest.mock.patch("Orange.evaluation.testing.Results.get_augmented_data") as mocked: |
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.
with unittest.mock.patch(
"Orange.evaluation.testing.Results.get_augmented_data",
side_effect=MemoryError) as mocked:
This way, it's more obvious why are you mocking.
mocked.side_effect = MemoryError() | ||
self.send_signal("Learner", MajorityLearner(), 0, wait=5000) | ||
|
||
self.assertTrue(self.widget.Error.memory_error.is_shown()) |
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.
Put this line inside with
. Not because it doesn't work outside, but because with
kind of groups the test.
Fixed. |
Issue
https://sentry.io/biolab/orange3/issues/218529776/
Description of changes
Includes