[PATCH 4 of 8 v2] tests: make test-ui-verbosity use print_function

Pulkit Goyal 7895pulkit at gmail.com
Tue Mar 29 07:47:48 EDT 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1459249021 -19800
#      Tue Mar 29 16:27:01 2016 +0530
# Node ID 78389f4d46a0dd47838bcfb3e69530e39edd28fe
# Parent  18a5327b41ee990848fc69be8756dfacaad3a98f
tests: make test-ui-verbosity use print_function

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 (<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
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,4 @@
+from __future__ import print_function
 import os
 from mercurial import ui
 
@@ -6,8 +7,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 +42,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)))


More information about the Mercurial-devel mailing list