示例#1
0
def test1(a, b):
    d = bdiff.bdiff(a, b)
    if not d:
        raise ValueError("empty")
    c = mpatch.patches(a, [d])
    if c != b:
        raise ValueError("bad")
示例#2
0
def showdiff(a, b):
    bin = bdiff.bdiff(a, b)
    pos = 0
    while pos < len(bin):
        p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12])
        pos += 12
        print p1, p2, repr(bin[pos:pos + l])
        pos += l
示例#3
0
def showdiff(a, b):
    bin = bdiff.bdiff(a, b)
    pos = 0
    while pos < len(bin):
        p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12])
        pos += 12
        print p1, p2, repr(bin[pos:pos + l])
        pos += l
示例#4
0
def test1(a, b):
    d = bdiff.bdiff(a, b)
    c = a
    if d:
        c = mpatch.patches(a, [d])
    if c != b:
        print "***", repr(a), repr(b)
        print "bad:"
        print repr(c)[:200]
        print repr(d)
示例#5
0
def test1(a, b):
    d = bdiff.bdiff(a, b)
    c = a
    if d:
        c = mpatch.patches(a, [d])
    if c != b:
        print "***", repr(a), repr(b)
        print "bad:"
        print repr(c)[:200]
        print repr(d)