コード例 #1
0
 def test_join(self):
     a = Context([Position(0, 13, 15)], TEST1, 0, 24)
     b = Context([Position(0, 16, 20)], TEST1, 0, 31)
     a.join(b)
     self.assertEqual(
         a, Context(
             [Position(0, 13, 15), Position(0, 16, 20)], TEST1, 0, 31))
コード例 #2
0
 def test_join_inclusion_sets(self):
     a = Context([Position(0, 13, 15)], TEST1, 0, 24)
     b = Context([Position(0, 13, 15)], TEST1, 3, 20)
     a.join(b)
     self.assertEqual(a, Context([Position(0, 13, 15)], TEST1, 0, 24))
コード例 #3
0
 def test_join_equal_windoows(self):
     a = Context([Position(0, 13, 15)], TEST1, 0, 24)
     b = Context([Position(0, 13, 15)], TEST1, 0, 24)
     a.join(b)
     self.assertEqual(a, Context([Position(0, 13, 15)], TEST1, 0, 24))