[PATCH 1 of 6 V2] tests: use print_function in test-filelog.py

Robert Stanca robert.stanca7 at gmail.com
Sun Apr 3 22:53:39 UTC 2016


# HG changeset patch
# User Robert Stanca <robert.stanca7 at gmail.com>
# Date 1459718231 -10800
#      Mon Apr 04 00:17:11 2016 +0300
# Node ID 6100d7fef146065f17bcddd064fcee3db633f11d
# Parent  1d83a0b55068b8389f98e0a8745978c045ea7f88
tests: use print_function in test-filelog.py

diff -r 1d83a0b55068 -r 6100d7fef146 tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Sun Apr 03 17:10:12 2016 +0300
+++ b/tests/test-check-py3-compat.t	Mon Apr 04 00:17:11 2016 +0300
@@ -56,7 +56,6 @@
   tests/test-demandimport.py not using absolute_import
   tests/test-demandimport.py requires print_function
   tests/test-doctest.py not using absolute_import
-  tests/test-filelog.py requires print_function
   tests/test-hg-parseurl.py not using absolute_import
   tests/test-hg-parseurl.py requires print_function
   tests/test-hgweb-auth.py not using absolute_import
@@ -218,7 +217,6 @@
   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-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  tests/test-filelog.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
   tests/test-hg-parseurl.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-hgweb-auth.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-hybridencode.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
diff -r 1d83a0b55068 -r 6100d7fef146 tests/test-filelog.py
--- a/tests/test-filelog.py	Sun Apr 03 17:10:12 2016 +0300
+++ b/tests/test-filelog.py	Mon Apr 04 00:17:11 2016 +0300
@@ -2,7 +2,7 @@
 """
 Tests the behavior of filelog w.r.t. data starting with '\1\n'
 """
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 from mercurial import (
     hg,
     ui,
@@ -37,7 +37,7 @@
             lock.release()
 
 def error(text):
-    print 'ERROR: ' + text
+    print('ERROR: ' + text)
 
 textwith = '\1\nfoo'
 without = 'foo'
@@ -59,4 +59,4 @@
 if fl.size(1) != len(textwith):
     error('filelog.size for a renaming + data starting with \\1\\n')
 
-print 'OK.'
+print('OK.')


More information about the Mercurial-devel mailing list