예제 #1
0
 def test_invalid_mergeInterval(self):
     with self.assertRaises(MergeException):
         mergeIntervals(Interval('(2, 4)'), Interval('(4, 6)'))
예제 #2
0
 def test_invalid_mergeInterval(self):
     with self.assertRaises(MergeException):
         mergeIntervals(Interval('(2, 4)'), Interval('(4, 6)'))
예제 #3
0
 def test_mergeIntervals(self):
     self.assertEqual(
         str(mergeIntervals(Interval('(2, 5)'), Interval('[4, 6]'))),
         '[3,6]')
예제 #4
0
 def test_mergeIntervals(self):
     self.assertEqual(str(mergeIntervals(Interval('(2, 5)'), Interval('[4, 6]'))), '[3,6]')