コード例 #1
0
 def testBasicReplace(self):
     a = ["a", "b"]
     b = ["a", "c"]
     self.assertDiff(a, b, [new_chunk(tag='equal', lines=[new_line(0, 0)]),
                            new_chunk(tag='replace', lines=[new_line(1, 1)])])
コード例 #2
0
 def testBasicDelete(self):
     a = ["a", "b"]
     b = ["a"]
     self.assertDiff(a, b, [new_chunk(tag='equal', lines=[new_line(0, 0)]),
                            new_chunk(tag='delete', lines=[new_line(1, None)])])
コード例 #3
0
 def testFakeInserted(self):
     a = None
     b = ["a"]
     self.assertDiff(a, b, [new_chunk(tag='insert', lines=[new_line(0, 0)])])
コード例 #4
0
 def testBasicInsert(self):
     a = ["a"]
     b = ["a", "b"]
     self.assertDiff(a, b, [new_chunk(tag='equal', lines=[new_line(0, 0)]),
                            new_chunk(tag='insert', lines=[new_line(None, 1)])])
コード例 #5
0
 def testFakeDeleted(self):
     a = ["a"]
     b = None
     self.assertDiff(a, b, [new_chunk(tag='delete', lines=[new_line(0, 0)])])