# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1459249021 -19800 # Node ID 870dae78234cf75c8974ca84d5cccaa610543f62 # Parent 2903558a6991b9b87bfa986264e783d5037278c7 py3: make test-ui-verbosity use print_function diff -r 2903558a6991 -r 870dae78234c tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Tue Mar 29 16:23:40 2016 +0530 +++ b/tests/test-check-py3-compat.t Tue Mar 29 16:27:01 2016 +0530 @@ -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 -r 2903558a6991 -r 870dae78234c tests/test-ui-verbosity.py --- a/tests/test-ui-verbosity.py Tue Mar 29 16:23:40 2016 +0530 +++ b/tests/test-ui-verbosity.py Tue Mar 29 16:27:01 2016 +0530 @@ -1,3 +1,5 @@ +from __future__ import print_function + import os from mercurial import ui @@ -6,8 +8,8 @@ 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 @@ 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)))