[PATCH 1 of 4 python3] posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3
Augie Fackler
raf at durin42.com
Sat Sep 16 00:34:03 UTC 2017
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1505518982 14400
# Fri Sep 15 19:43:02 2017 -0400
# Node ID 34469e4e2187381259d78ec0a35c2dd5b0e9e85a
# Parent d08554602cdbd245ddd213af325473da037a240f
posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3
We were previously getting lucky on Python 2.
diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -344,11 +344,11 @@ if pycompat.sysplatform == 'darwin':
>>> normcase(b'UPPER')
'upper'
- >>> normcase(b'Caf\xc3\xa9')
+ >>> normcase(b'Caf\\xc3\\xa9')
'cafe\\xcc\\x81'
- >>> normcase(b'\xc3\x89')
+ >>> normcase(b'\\xc3\\x89')
'e\\xcc\\x81'
- >>> normcase(b'\xb8\xca\xc3\xca\xbe\xc8.JPG') # issue3918
+ >>> normcase(b'\\xb8\\xca\\xc3\\xca\\xbe\\xc8.JPG') # issue3918
'%b8%ca%c3\\xca\\xbe%c8.jpg'
'''
More information about the Mercurial-devel
mailing list