Fix test incompatibility with Python 3 versions

Replaced 'print' instruction with call of a 'six' package's
implementation compatible with Python 2 as well as Python 3.
This commit is contained in:
Nick Gashkov 2018-09-11 16:08:19 +03:00
parent f807749be5
commit d6bfc8be79

View File

@ -13,7 +13,7 @@ try:
except TemplateError as the_error:
six.print_(six.text_type(the_error))
if hasattr(the_error, 'docx_context'):
print "Context:"
six.print_("Context:")
for line in the_error.docx_context:
six.print_(line)
tpl.save('test_files/template_error.docx')