Patchwork [5,of,5] tests: use print_function in test-status-inprocess.py

login
register
mail settings
Submitter roby roby
Date April 4, 2016, 2:39 a.m.
Message ID <44cb3baf421a73061861.1459737574@roby>
Download mbox | patch
Permalink /patch/14329/
State Accepted
Headers show

Comments

roby roby - April 4, 2016, 2:39 a.m.
# HG changeset patch
# User Robert Stanca <robert.stanca7@gmail.com>
# Date 1459736440 -10800
#      Mon Apr 04 05:20:40 2016 +0300
# Node ID 44cb3baf421a730618614c34ad1f5cde899eadf6
# Parent  ffbea42e866d7aa923b3d99caefa1a213bea1c72
tests: use print_function in test-status-inprocess.py
Pierre-Yves David - April 4, 2016, 3 a.m.
On 04/03/2016 07:39 PM, Robert Stanca wrote:
> # HG changeset patch
> # User Robert Stanca <robert.stanca7@gmail.com>
> # Date 1459736440 -10800
> #      Mon Apr 04 05:20:40 2016 +0300
> # Node ID 44cb3baf421a730618614c34ad1f5cde899eadf6
> # Parent  ffbea42e866d7aa923b3d99caefa1a213bea1c72
> tests: use print_function in test-status-inprocess.py

Pushed, thanks.

Patch

diff -r ffbea42e866d -r 44cb3baf421a tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Mon Apr 04 05:19:35 2016 +0300
+++ b/tests/test-check-py3-compat.t	Mon Apr 04 05:20:40 2016 +0300
@@ -64,7 +64,6 @@ 
   tests/test-pathencode.py requires print_function
   tests/test-run-tests.py not using absolute_import
   tests/test-simplemerge.py not using absolute_import
-  tests/test-status-inprocess.py requires print_function
   tests/test-symlink-os-yes-fs-no.py not using absolute_import
   tests/test-trusted.py not using absolute_import
   tests/test-trusted.py requires print_function
@@ -203,6 +202,5 @@ 
   tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
   tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
 #endif
diff -r ffbea42e866d -r 44cb3baf421a tests/test-status-inprocess.py
--- a/tests/test-status-inprocess.py	Mon Apr 04 05:19:35 2016 +0300
+++ b/tests/test-status-inprocess.py	Mon Apr 04 05:20:40 2016 +0300
@@ -1,5 +1,5 @@ 
 #!/usr/bin/python
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 from mercurial.ui import (
     ui,
 )
@@ -14,7 +14,7 @@ 
 
 u = ui()
 
-print '% creating repo'
+print('% creating repo')
 repo = localrepository(u, '.', create=True)
 
 f = open('test.py', 'w')
@@ -23,13 +23,13 @@ 
 finally:
     f.close
 
-print '% add and commit'
+print('% add and commit')
 add(u, repo, 'test.py')
 commit(u, repo, message='*')
 status(u, repo, clean=True)
 
 
-print '% change'
+print('% change')
 f = open('test.py', 'w')
 try:
     f.write('bar\n')