changeset 28766:7f7cd44cd6d5

py3: use print_function in test-status-inprocess.py
author Robert Stanca <robert.stanca7@gmail.com>
date Mon, 04 Apr 2016 05:20:40 +0300
parents 7779f9dfd938
children 73bfd9a54a5c
files tests/test-check-py3-compat.t tests/test-status-inprocess.py
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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
@@ -228,7 +227,6 @@
   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
--- 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')