示例#1
0
 def test_at_end_of_list(self):
     self.assertEqual(find_contiguous_sum([1, 1, 3], 4), (1, 3))
示例#2
0
 def test_in_middle_of_list(self):
     self.assertEqual(find_contiguous_sum([1, 2, 3, 4], 5), (1, 3))
示例#3
0
 def test_does_not_exist(self):
     self.assertEqual(find_contiguous_sum([2, 3], 1), (-1, -1))
示例#4
0
 def test_at_start_of_list(self):
     self.assertEqual(find_contiguous_sum([1, 1, 3], 2), (0, 2))
示例#5
0
 def test_empty(self):
     self.assertEqual(find_contiguous_sum([], 1), (-1, -1))