changeset 34150:e9e225f16932

doctest: pass encoding name as system string
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Sep 2017 15:42:27 +0900
parents d4d4d11bac77
children 414a3513c2bd
files mercurial/encoding.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/encoding.py	Sun Sep 03 14:38:58 2017 +0900
+++ b/mercurial/encoding.py	Sun Sep 03 15:42:27 2017 +0900
@@ -268,7 +268,7 @@
     >>> print trim(t, 1, ellipsis=ellipsis)
     +
     >>> u = u'\u3042\u3044\u3046\u3048\u304a' # 2 x 5 = 10 columns
-    >>> t = u.encode(encoding.encoding)
+    >>> t = u.encode(pycompat.sysstr(encoding.encoding))
     >>> print trim(t, 12, ellipsis=ellipsis)
     \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a
     >>> print trim(t, 10, ellipsis=ellipsis)