changeset 34133:708b5530a273

doctest: replace chr() with pycompat.bytechr()
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Sep 2017 14:37:25 +0900
parents 264872544362
children d4d4d11bac77
files mercurial/changelog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changelog.py	Sun Sep 03 14:35:37 2017 +0900
+++ b/mercurial/changelog.py	Sun Sep 03 14:37:25 2017 +0900
@@ -27,6 +27,7 @@
 
 def _string_escape(text):
     """
+    >>> from .pycompat import bytechr as chr
     >>> d = {b'nl': chr(10), b'bs': chr(92), b'cr': chr(13), b'nul': chr(0)}
     >>> s = b"ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d
     >>> s
@@ -41,6 +42,7 @@
 
 def decodeextra(text):
     """
+    >>> from .pycompat import bytechr as chr
     >>> sorted(decodeextra(encodeextra({b'foo': b'bar', b'baz': chr(0) + b'2'})
     ...                    ).items())
     [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')]