# HG changeset patch # User Robert Stanca # Date 1459728248 -10800 # Node ID 6b2f9a4e2f9774b06ed23bd5dd19af38673e1d7a # Parent 67a4e42a651f808f6ab285236598caa156e5a1d0 py3: use print_function in test-minirst.py diff -r 67a4e42a651f -r 6b2f9a4e2f97 tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Mon Apr 04 03:00:43 2016 +0300 +++ b/tests/test-check-py3-compat.t Mon Apr 04 03:04:08 2016 +0300 @@ -60,7 +60,6 @@ tests/test-lrucachedict.py not using absolute_import tests/test-lrucachedict.py requires print_function tests/test-manifest.py not using absolute_import - tests/test-minirst.py requires print_function tests/test-parseindex2.py not using absolute_import tests/test-parseindex2.py requires print_function tests/test-pathencode.py not using absolute_import @@ -236,7 +235,6 @@ 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-minirst.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-parseindex*.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-propertycache.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) diff -r 67a4e42a651f -r 6b2f9a4e2f97 tests/test-minirst.py --- a/tests/test-minirst.py Mon Apr 04 03:00:43 2016 +0300 +++ b/tests/test-minirst.py Mon Apr 04 03:04:08 2016 +0300 @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import, print_function from pprint import ( pprint, ) @@ -8,24 +8,24 @@ def debugformat(text, form, **kwargs): if form == 'html': - print "html format:" + print("html format:") out = minirst.format(text, style=form, **kwargs) else: - print "%d column format:" % form + print("%d column format:" % form) out = minirst.format(text, width=form, **kwargs) - print "-" * 70 + print("-" * 70) if type(out) == tuple: - print out[0][:-1] - print "-" * 70 + print(out[0][:-1]) + print("-" * 70) pprint(out[1]) else: - print out[:-1] - print "-" * 70 - print + print(out[:-1]) + print("-" * 70) + print() def debugformats(title, text, **kwargs): - print "== %s ==" % title + print("== %s ==" % title) debugformat(text, 60, **kwargs) debugformat(text, 30, **kwargs) debugformat(text, 'html', **kwargs) @@ -246,7 +246,7 @@ rst = minirst.maketable(data, 2, True) table = ''.join(rst) -print table +print(table) debugformats('table', table) @@ -256,7 +256,7 @@ rst = minirst.maketable(data, 1, False) table = ''.join(rst) -print table +print(table) debugformats('table+nl', table)