From patchwork Mon Apr 4 02:39:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5,of,5] tests: use print_function in test-status-inprocess.py From: roby roby X-Patchwork-Id: 14329 Message-Id: <44cb3baf421a73061861.1459737574@roby> To: mercurial-devel@mercurial-scm.org Date: Mon, 04 Apr 2016 05:39:34 +0300 # HG changeset patch # User Robert Stanca # 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 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 (, line *) (glob) tests/test-demandimport.py: invalid syntax: invalid syntax (, line *) (glob) tests/test-lrucachedict.py: invalid syntax: invalid syntax (, line *) (glob) - tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-trusted.py: invalid syntax: invalid syntax (, 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')