Patchwork [2,of,4] tests: test-dispatch use print_function

login
register
mail settings
Submitter timeless@mozdev.org
Date March 8, 2016, 9:17 p.m.
Message ID <4bc1a684c07d918a013c.1457471860@waste.org>
Download mbox | patch
Permalink /patch/13690/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 8, 2016, 9:17 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1457470660 0
#      Tue Mar 08 20:57:40 2016 +0000
# Node ID 4bc1a684c07d918a013c52d3c5c3c7f5802a235b
# Parent  1436be166642c7a986a06be13850b96d1aa2c77d
tests: test-dispatch use print_function

Patch

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
@@ -118,7 +118,6 @@ 
   tests/test-context.py requires print_function
   tests/test-demandimport.py not using absolute_import
   tests/test-demandimport.py requires print_function
-  tests/test-dispatch.py requires print_function
   tests/test-doctest.py not using absolute_import
   tests/test-duplicateoptions.py not using absolute_import
   tests/test-duplicateoptions.py requires print_function
diff --git a/tests/test-dispatch.py b/tests/test-dispatch.py
--- a/tests/test-dispatch.py
+++ b/tests/test-dispatch.py
@@ -1,4 +1,4 @@ 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 import os
 from mercurial import (
     dispatch,
@@ -9,11 +9,10 @@ 
 
     Prints command and result value, but does not handle quoting.
     """
-    print "running: %s" % (cmd,)
+    print("running: %s" % (cmd,))
     req = dispatch.request(cmd.split())
     result = dispatch.dispatch(req)
-    print "result: %r" % (result,)
-
+    print("result: %r" % (result,))
 
 testdispatch("init test1")
 os.chdir('test1')