py3: make test-wireproto use print_function
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 29 Mar 2016 16:14:58 +0530
changeset 28675 fcafd84bc9c5
parent 28674 03d1ecbbd81e
child 28676 a4803f35efba
py3: make test-wireproto use print_function
tests/test-check-py3-compat.t
tests/test-wireproto.py
--- a/tests/test-check-py3-compat.t	Tue Mar 29 17:22:08 2016 +0000
+++ b/tests/test-check-py3-compat.t	Tue Mar 29 16:14:58 2016 +0530
@@ -116,7 +116,6 @@
   tests/test-url.py not using absolute_import
   tests/test-url.py requires print_function
   tests/test-walkrepo.py requires print_function
-  tests/test-wireproto.py requires print_function
 
 #if py3exe
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
@@ -301,6 +300,5 @@
   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)
   tests/test-walkrepo.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  tests/test-wireproto.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
 
 #endif
--- a/tests/test-wireproto.py	Tue Mar 29 17:22:08 2016 +0000
+++ b/tests/test-wireproto.py	Tue Mar 29 16:14:58 2016 +0530
@@ -1,4 +1,4 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import StringIO
 
@@ -52,8 +52,8 @@
 srv = serverrepo()
 clt = clientpeer(srv)
 
-print clt.greet("Foobar")
+print(clt.greet("Foobar"))
 b = clt.batch()
 fs = [b.greet(s) for s in ["Fo, =;:<o", "Bar"]]
 b.submit()
-print [f.value for f in fs]
+print([f.value for f in fs])