Example #1
0
    def test_positive_inclusive(self):
        interval_1 = Interval(-1.5, 1, is_end_inclusive=True)
        interval_2 = Interval(1, 3, is_start_inclusive=True)

        self.assertTrue(interval_1.is_overlapping(interval_2))
        self.assertTrue(interval_2.is_overlapping(interval_1))
Example #2
0
    def test_negative_inclusive(self):
        interval_1 = Interval(-1.5, 1, is_end_inclusive=True)
        interval_2 = Interval(1, 3, is_end_inclusive=True)

        self.assertFalse(interval_1.is_overlapping(interval_2))
        self.assertFalse(interval_2.is_overlapping(interval_1))