'Handling memory error.
GH-2316'

def test_memory_error(self):

    data = Table('iris')[::15]
    self.send_signal(self.widget.Inputs.train_data, data)
    self.assertFalse(self.widget.Error.memory_error.is_shown())
    with unittest.mock.patch('Orange.evaluation.testing.Results.get_augmented_data', side_effect=MemoryError):
        self.send_signal(self.widget.Inputs.learner, MajorityLearner(), 0, wait=5000)
        self.assertTrue(self.widget.Error.memory_error.is_shown())
