예제 #1
0
 def testSyncPointMatcher1(self):
     a = list('012a3456c789')
     b = list('0a3412b5678')
     r = [(0, 0, 1), (1, 4, 2), (6, 7, 2), (9, 9, 2), (12, 11, 0)]
     matcher = myers.SyncPointMyersSequenceMatcher(None, a, b, [(3, 6)])
     blocks = matcher.get_matching_blocks()
     self.assertEqual(blocks, r)
예제 #2
0
파일: test_matchers.py 프로젝트: xyui/meld
 def test_sync_point_matcher3(self):
     a = list('012a3456c789')
     b = list('02a341b5678')
     r = [(0, 0, 1), (2, 1, 1), (3, 2, 3), (9, 9, 2), (12, 11, 0)]
     matcher = myers.SyncPointMyersSequenceMatcher(None, a, b, [(3, 2),
                                                                (8, 6)])
     blocks = matcher.get_matching_blocks()
     self.assertEqual(blocks, r)