示例#1
0
 def test_equal_mergeOverlapping(self):
     self.assertEqual(mergeOverlapping(['(1,14)', '(11,12]']), [[2, 13]])
     self.assertEqual(mergeOverlapping(['(1,10)', '(11,13]']),
                      [[2, 9], [12, 13]])
     self.assertEqual(
         mergeOverlapping(['(-2,1)', '[3,6]', '(7,8]', '[9,19)']),
         [[-1, 0], [3, 6], [8, 18]])
示例#2
0
 def test_ValueError_mergeOverlapping(self):
     with self.assertRaises(ValueError):
         value = mergeOverlapping(['(a,1)', '[3,6]', '(9,11)'])
示例#3
0
 def test_ValueError_mergeOverlapping(self):
     with self.assertRaises(ValueError):
         value = mergeOverlapping(['(a,1)','[3,6]','(9,11)'])
示例#4
0
 def test_equal_mergeOverlapping(self):
     self.assertEqual(mergeOverlapping(['(1,14)','(11,12]']), [[2, 13]])
     self.assertEqual(mergeOverlapping(['(1,10)','(11,13]']), [[2, 9], [12, 13]])
     self.assertEqual(mergeOverlapping(['(-2,1)','[3,6]','(7,8]','[9,19)']), [[-1, 0], [3, 6], [8, 18]])