Ejemplo n.º 1
0
 def test_true(self):
     """Verify that oerlapping intervals are considered as such."""
     target = Interval(3, 4)
     for low, high in ((2, 3), (3, 3), (3, 4), (4, 4), (4, 5)):
         with self.subTest(interval=(low, high)):
             self.assertTrue(target.overlaps(Interval(low, high)))
Ejemplo n.º 2
0
 def test_true(self):
     """Verify that oerlapping intervals are considered as such."""
     target = Interval(3, 4)
     for low, high in ((2, 3), (3, 3), (3, 4), (4, 4), (4, 5)):
         with self.subTest(interval=(low, high)):
             self.assertTrue(target.overlaps(Interval(low, high)))
Ejemplo n.º 3
0
 def test_false(self):
     """Verify that non-overlapping intervals are considered as such."""
     target = Interval(3, 4)
     for low, high in ((1, 2), (5, 6)):
         with self.subTest(interval=(low, high)):
             self.assertFalse(target.overlaps(Interval(low, high)))
Ejemplo n.º 4
0
 def test_false(self):
     """Verify that non-overlapping intervals are considered as such."""
     target = Interval(3, 4)
     for low, high in ((1, 2), (5, 6)):
         with self.subTest(interval=(low, high)):
             self.assertFalse(target.overlaps(Interval(low, high)))