comparison tests/run-tests.py @ 48860:4cea98b32d95

tests: unconditionalize bchr We could probably just do bytes([x]) everywhere. But this eliminates use of PYTHON3. Differential Revision: https://phab.mercurial-scm.org/D12238
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 13:21:30 -0700
parents f928dec9add7
children 7265e5b1d18e
comparison
equal deleted inserted replaced
48859:f928dec9add7 48860:4cea98b32d95
1653 # Not all platforms have 127.0.0.1 as loopback (though most do), 1653 # Not all platforms have 127.0.0.1 as loopback (though most do),
1654 # so we always glob that too. 1654 # so we always glob that too.
1655 re.compile(br'.*\$LOCALIP.*$'), 1655 re.compile(br'.*\$LOCALIP.*$'),
1656 ] 1656 ]
1657 1657
1658 bchr = chr 1658 bchr = lambda x: bytes([x])
1659 if PYTHON3:
1660 bchr = lambda x: bytes([x])
1661 1659
1662 WARN_UNDEFINED = 1 1660 WARN_UNDEFINED = 1
1663 WARN_YES = 2 1661 WARN_YES = 2
1664 WARN_NO = 3 1662 WARN_NO = 3
1665 1663