예제 #1
0
 def test_outside_begin(self):
     itvl1 = Interval(65, 84)
     itvl2 = Interval(65, 69)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.outside_begin, rel)
예제 #2
0
 def test_inside(self):
     itvl1 = Interval(43, 54)
     itvl2 = Interval(26, 95)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.inside, rel)
예제 #3
0
 def test_inside_begin(self):
     itvl1 = Interval(35, 59)
     itvl2 = Interval(35, 64)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.inside_begin, rel)
예제 #4
0
 def test_equal(self):
     itvl1 = Interval(11, 78)
     itvl2 = Interval(11, 78)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.equal, rel)
예제 #5
0
 def test_outside_end(self):
     itvl1 = Interval(2, 99)
     itvl2 = Interval(6, 99)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.outside_end, rel)
예제 #6
0
 def test_outside(self):
     itvl1 = Interval(1, 76)
     itvl2 = Interval(51, 72)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.outside, rel)
예제 #7
0
 def test_abut_before_empty(self):
     itvl1 = Interval(32, 32)
     itvl2 = Interval(32, 79)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.abut_before, rel)
예제 #8
0
 def test_overlap_before(self):
     itvl1 = Interval(5, 57)
     itvl2 = Interval(20, 88)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.overlap_before, rel)
예제 #9
0
 def test_before(self):
     itvl1 = Interval(32, 56)
     itvl2 = Interval(81, 97)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.before, rel)
예제 #10
0
 def test_abut_before(self):
     itvl1 = Interval(15, 64)
     itvl2 = Interval(64, 80)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.abut_before, rel)
예제 #11
0
 def test_after(self):
     itvl1 = Interval(90, 95)
     itvl2 = Interval(15, 33)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.after, rel)
예제 #12
0
 def test_abut_after(self):
     itvl1 = Interval(7, 32)
     itvl2 = Interval(5, 7)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.abut_after, rel)
예제 #13
0
 def test_abut_after_empty(self):
     itvl1 = Interval(20, 20)
     itvl2 = Interval(1, 20)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.abut_after, rel)
예제 #14
0
 def test_overlap_after(self):
     itvl1 = Interval(38, 90)
     itvl2 = Interval(1, 71)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.overlap_after, rel)
예제 #15
0
 def test_inside_end(self):
     itvl1 = Interval(67, 73)
     itvl2 = Interval(8, 73)
     rel = itvl1.allen_relation(itvl2)
     self.assertEqual(AllenRelation.inside_end, rel)