'Handling memory error.
GH-2336'

def test_memory_error(self):

    data = Orange.data.Table('iris')[::3]
    self.assertFalse(self.widget.Error.memory_error.is_shown())
    with unittest.mock.patch('numpy.asarray', side_effect=MemoryError):
        self.widget._matrix = None
        self.widget.data = data
        self.widget._effective_data = data
        self.widget._update()
        self.assertTrue(self.widget.Error.memory_error.is_shown())
