changeset 28746:de5808c57f58

py3: use print_function in test-hg-parseurl.py
author Robert Stanca <robert.stanca7@gmail.com>
date Mon, 04 Apr 2016 00:29:03 +0300
parents 8a23f88131c3
children 779addce6910
files tests/test-check-py3-compat.t tests/test-hg-parseurl.py
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-py3-compat.t	Mon Apr 04 00:27:04 2016 +0300
+++ b/tests/test-check-py3-compat.t	Mon Apr 04 00:29:03 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-hg-parseurl.py requires print_function
   tests/test-hgweb-auth.py not using absolute_import
   tests/test-hgweb-auth.py requires print_function
   tests/test-hgwebdir-paths.py not using absolute_import
@@ -241,7 +240,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-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)
   tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
--- a/tests/test-hg-parseurl.py	Mon Apr 04 00:27:04 2016 +0300
+++ b/tests/test-hg-parseurl.py	Mon Apr 04 00:29:03 2016 +0300
@@ -1,10 +1,10 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 from mercurial.hg import (
     parseurl,
 )
 
 def testparse(url, branch=[]):
-    print '%s, branches: %r' % parseurl(url, branch)
+    print('%s, branches: %r' % parseurl(url, branch))
 
 testparse('http://example.com/no/anchor')
 testparse('http://example.com/an/anchor#foo')