def test_brutemaxarray_allnegative(self): actual = dac.brute_maxsubarray([-3, -1, -3]) expected = (1, 1, -1) self.assertEqual(expected, actual)
def test_brutemaxarray_allpositive(self): actual = dac.brute_maxsubarray([1, 1, 1, 1]) expected = (0, 3, 4) self.assertEqual(expected, actual)
def test_brutemaxarray_allNegativeExceptLast(self): actual = dac.brute_maxsubarray([-1, -1, -1, 17]) expected = (3, 3, 17) self.assertEqual(expected, actual)
def test_brutemaxarray_singleelement(self): actual = dac.brute_maxsubarray([3]) expected = (0, 0, 3) self.assertEqual(expected, actual)