Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 34152:a8994d08e4a2
doctest: use print_function and convert bytes to unicode where needed
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 14:56:31 +0900 |
parents | 0fa781320203 |
children | be00af4a1ac5 |
line wrap: on
line diff
--- a/mercurial/templater.py Sun Sep 03 15:47:17 2017 +0900 +++ b/mercurial/templater.py Sun Sep 03 14:56:31 2017 +0900 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -from __future__ import absolute_import +from __future__ import absolute_import, print_function import os import re @@ -192,7 +192,7 @@ """Expand list of templates to node tuple >>> def f(tree): - ... print prettyformat(_unnesttemplatelist(tree)) + ... print(pycompat.sysstr(prettyformat(_unnesttemplatelist(tree)))) >>> f((b'template', [])) (string '') >>> f((b'template', [(b'string', b'foo')]))