示例#1
0
    def test_ival_overlap(self):

        ival0 = s_interval.fold(10, 20)
        ival1 = s_interval.fold(15, 30)
        ival2 = s_interval.fold(30, 50)
        ival3 = s_interval.fold(1, 100)

        self.true(s_interval.overlap(ival0, ival1))
        self.false(s_interval.overlap(ival1, ival2))

        self.true(s_interval.overlap(ival0, ival3))
        self.true(s_interval.overlap(ival1, ival3))
        self.true(s_interval.overlap(ival2, ival3))
示例#2
0
    def test_ival_overlap(self):

        ival0 = s_interval.fold(10, 20)
        ival1 = s_interval.fold(15, 30)
        ival2 = s_interval.fold(30, 50)
        ival3 = s_interval.fold(1, 100)

        self.true(s_interval.overlap(ival0, ival1))
        self.false(s_interval.overlap(ival1, ival2))

        self.true(s_interval.overlap(ival0, ival3))
        self.true(s_interval.overlap(ival1, ival3))
        self.true(s_interval.overlap(ival2, ival3))
示例#3
0
 def test_ival_fold(self):
     vals = [None, 100, 20, None]
     self.eq(s_interval.fold(*vals), (20, 100))
     self.none(s_interval.fold())
示例#4
0
 def test_ival_fold(self):
     vals = [None, 100, 20, None]
     self.eq(s_interval.fold(*vals), (20, 100))
     self.none(s_interval.fold())