def test_not_in_2(self): message = [1, 2, 3, 4] t = 15 ans = check_sum(message, t) self.assertEqual(ans, [-1, -1])
def test_not_in_singleton(self): message = [1] t = 5 ans = check_sum(message, t) self.assertEqual(ans, [-1, -1])
def test_whole_seq(self): message = [1, 2, 3, 4, 5] t = sum(message) ans = check_sum(message, t) self.assertEqual(ans, [0, 4])
def test_singleton(self): message = [1] t = 1 ans = check_sum(message, t) self.assertEqual(ans, [0, 0])
def test_single_val(self): message = [1, 1, 15, 1] t = 15 ans = check_sum(message, t) self.assertEqual(ans, [2, 2])
def test_repeated(self): message = [9, 1, 2, 3, 1, 1, 1, 2, 3] t = 6 ans = check_sum(message, t) self.assertEqual(ans, [1, 3])
def test_basic(self): message = [4, 3, 5, 7, 8] t = 12 ans = check_sum(message, t) self.assertEqual(ans, [0, 2])