comparison tests/test-doctest.py @ 31439:b70407bd84d5

pycompat: add bytestr wrapper which mostly acts as a Python 2 str This allows us to handle bytes in mostly the same manner as Python 2 str, so we can get rid of ugly s[i:i + 1] hacks: s = bytestr(s) while i < len(s): c = s[i] ... This is the simpler version of the previous RFC patch which tried to preserve the bytestr type if possible. New version simply drops the bytestr wrapping so we aren't likely to pass a bytestr to a function that expects Python 3 bytes.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 08 Mar 2017 22:48:26 +0900
parents 82350f7fa56c
children a7c687c35119
comparison
equal deleted inserted replaced
31438:82350f7fa56c 31439:b70407bd84d5
32 testmod('mercurial.match') 32 testmod('mercurial.match')
33 testmod('mercurial.minirst') 33 testmod('mercurial.minirst')
34 testmod('mercurial.patch') 34 testmod('mercurial.patch')
35 testmod('mercurial.pathutil') 35 testmod('mercurial.pathutil')
36 testmod('mercurial.parser') 36 testmod('mercurial.parser')
37 testmod('mercurial.pycompat', py3=True)
37 testmod('mercurial.revsetlang') 38 testmod('mercurial.revsetlang')
38 testmod('mercurial.smartset') 39 testmod('mercurial.smartset')
39 testmod('mercurial.store') 40 testmod('mercurial.store')
40 testmod('mercurial.subrepo') 41 testmod('mercurial.subrepo')
41 testmod('mercurial.templatefilters') 42 testmod('mercurial.templatefilters')