diff mercurial/store.py @ 34136:414a3513c2bd

doctest: do not embed non-ascii characters in docstring Since the outer docstring is parsed as a unicode on Python 3, we have to either double-escape or construct non-ascii string from ascii string.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Sep 2017 15:47:17 +0900
parents 0fa781320203
children 96808804b68f
line wrap: on
line diff
--- a/mercurial/store.py	Sun Sep 03 15:42:27 2017 +0900
+++ b/mercurial/store.py	Sun Sep 03 15:47:17 2017 +0900
@@ -95,7 +95,7 @@
     >>> dec(b'hello~3aworld~3f')
     'hello:world?'
 
-    >>> enc(b'the\x07quick\xADshot')
+    >>> enc(b'the\\x07quick\\xADshot')
     'the~07quick~adshot'
     >>> dec(b'the~07quick~adshot')
     'the\\x07quick\\xadshot'
@@ -154,7 +154,7 @@
     'hello'
     >>> f(b'hello:world?')
     'hello~3aworld~3f'
-    >>> f(b'the\x07quick\xADshot')
+    >>> f(b'the\\x07quick\\xADshot')
     'the~07quick~adshot'
     '''
     cmap = dict([(chr(x), chr(x)) for x in xrange(127)])