changeset 28678:870dae78234c

py3: make test-ui-verbosity use print_function
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 29 Mar 2016 16:27:01 +0530
parents 2903558a6991
children e48a8ac66a41
files tests/test-check-py3-compat.t tests/test-ui-verbosity.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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 (<unknown>, line *) (glob)
   tests/test-ui-color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-ui-config.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  tests/test-ui-verbosity.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
 
 #endif
--- 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)))