Patchwork D12238: tests: unconditionalize bchr

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 12:43 a.m.
Message ID <differential-rev-PHID-DREV-vxylbojnxaiilm4y232f-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50579/
State New
Headers show

Comments

phabricator - March 2, 2022, 12:43 a.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We could probably just do bytes([x]) everywhere. But this eliminates
  use of PYTHON3.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12238

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1655,9 +1655,7 @@ 
     re.compile(br'.*\$LOCALIP.*$'),
 ]
 
-bchr = chr
-if PYTHON3:
-    bchr = lambda x: bytes([x])
+bchr = lambda x: bytes([x])
 
 WARN_UNDEFINED = 1
 WARN_YES = 2