--- a/tests/test-bdiff.py Sun Apr 03 06:12:18 2016 +0300
+++ b/tests/test-bdiff.py Sun Apr 03 06:16:17 2016 +0300
@@ -1,4 +1,4 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
import struct
from mercurial import (
bdiff,
@@ -11,13 +11,13 @@
if d:
c = mpatch.patches(a, [d])
if c != b:
- print "***", repr(a), repr(b)
- print "bad:"
- print repr(c)[:200]
- print repr(d)
+ print("***", repr(a), repr(b))
+ print("bad:")
+ print(repr(c)[:200])
+ print(repr(d))
def test(a, b):
- print "***", repr(a), repr(b)
+ print("***", repr(a), repr(b))
test1(a, b)
test1(b, a)
@@ -48,23 +48,23 @@
while pos < len(bin):
p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12])
pos += 12
- print p1, p2, repr(bin[pos:pos + l])
+ print(p1, p2, repr(bin[pos:pos + l]))
pos += l
showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\nx\n\nz\n")
showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\ny\n\nx\n\nz\n")
-print "done"
+print("done")
def testfixws(a, b, allws):
c = bdiff.fixws(a, allws)
if c != b:
- print "*** fixws", repr(a), repr(b), allws
- print "got:"
- print repr(c)
+ print("*** fixws", repr(a), repr(b), allws)
+ print("got:")
+ print(repr(c))
testfixws(" \ta\r b\t\n", "ab\n", 1)
testfixws(" \ta\r b\t\n", " a b\n", 0)
testfixws("", "", 1)
testfixws("", "", 0)
-print "done"
+print("done")