--- 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)