diff --git a/tests/test-bdiff.py b/tests/test-bdiff.py index 2e54aaa65afc5cb66101ac63e3d40191ac028b4e_dGVzdHMvdGVzdC1iZGlmZi5weQ==..4e51f9d1683ec34d7f6377d354ac0eab6b154a14_dGVzdHMvdGVzdC1iZGlmZi5weQ== 100644 --- a/tests/test-bdiff.py +++ b/tests/test-bdiff.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import, print_function import struct from mercurial import ( bdiff, @@ -11,9 +11,9 @@ 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): @@ -18,6 +18,6 @@ def test(a, b): - print "***", repr(a), repr(b) + print("***", repr(a), repr(b)) test1(a, b) test1(b, a) @@ -48,8 +48,8 @@ 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") @@ -52,9 +52,9 @@ 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: @@ -57,13 +57,13 @@ 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) @@ -64,7 +64,7 @@ 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") diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t index 2e54aaa65afc5cb66101ac63e3d40191ac028b4e_dGVzdHMvdGVzdC1jaGVjay1weTMtY29tcGF0LnQ=..4e51f9d1683ec34d7f6377d354ac0eab6b154a14_dGVzdHMvdGVzdC1jaGVjay1weTMtY29tcGF0LnQ= 100644 --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -53,7 +53,6 @@ tests/svn-safe-append.py not using absolute_import tests/svnxml.py not using absolute_import tests/test-atomictempfile.py not using absolute_import - tests/test-bdiff.py requires print_function tests/test-context.py not using absolute_import tests/test-context.py requires print_function tests/test-demandimport.py not using absolute_import @@ -250,7 +249,6 @@ mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) - tests/test-bdiff.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) tests/test-context.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) tests/test-duplicateoptions.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)