Exemplo n.º 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)])])
Exemplo n.º 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)])])
Exemplo n.º 3
0
 def testFakeInserted(self):
     a = None
     b = ["a"]
     self.assertDiff(a, b, [new_chunk(tag='insert', lines=[new_line(0, 0)])])
Exemplo n.º 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)])])
Exemplo n.º 5
0
 def testFakeDeleted(self):
     a = ["a"]
     b = None
     self.assertDiff(a, b, [new_chunk(tag='delete', lines=[new_line(0, 0)])])