diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -112,7 +112,6 @@ tests/test-ui-config.py not using absolute_import tests/test-ui-config.py requires print_function tests/test-ui-verbosity.py not using absolute_import - tests/test-ui-verbosity.py requires print_function tests/test-url.py not using absolute_import #if py3exe @@ -296,6 +295,5 @@ tests/test-trusted.py: invalid syntax: invalid syntax (, line *) (glob) tests/test-ui-color.py: invalid syntax: invalid syntax (, line *) (glob) tests/test-ui-config.py: invalid syntax: invalid syntax (, line *) (glob) - tests/test-ui-verbosity.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) #endif diff --git a/tests/test-ui-verbosity.py b/tests/test-ui-verbosity.py --- a/tests/test-ui-verbosity.py +++ b/tests/test-ui-verbosity.py @@ -1,3 +1,5 @@ +from __future__ import print_function + import os from mercurial import ui @@ -6,8 +8,8 @@ f = open(hgrc) basehgrc = f.read() f.close() -print ' hgrc settings command line options final result ' -print ' quiet verbo debug quiet verbo debug quiet verbo debug' +print(' hgrc settings command line options final result ') +print(' quiet verbo debug quiet verbo debug quiet verbo debug') for i in xrange(64): hgrc_quiet = bool(i & 1<<0) @@ -41,7 +43,7 @@ for i in xrange(64): elif u.verbose and u.quiet: check = ' +' - print ('%2d %5s %5s %5s %5s %5s %5s -> %5s %5s %5s%s' + print(('%2d %5s %5s %5s %5s %5s %5s -> %5s %5s %5s%s' % (i, hgrc_quiet, hgrc_verbose, hgrc_debug, cmd_quiet, cmd_verbose, cmd_debug, - u.quiet, u.verbose, u.debugflag, check)) + u.quiet, u.verbose, u.debugflag, check)))