'Users sees an error message when calculating too large arrays and Orange
does not crash.
GH-2315'

def test_too_big_array(self):

    self.assertEqual(len(self.widget.Error.active), 0)
    self.send_signal(self.widget.Inputs.data, self.iris)
    mock = Mock(side_effect=ValueError)
    self.widget.compute_distances(mock, self.iris)
    self.assertTrue(self.widget.Error.distances_value_error.is_shown())
    mock = Mock(side_effect=MemoryError)
    self.widget.compute_distances(mock, self.iris)
    self.assertEqual(len(self.widget.Error.active), 1)
    self.assertTrue(self.widget.Error.distances_memory_error.is_shown())
