Patchwork D12241: tests: unconditionalize _bytes2sys()

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 12:43 a.m.
Message ID <differential-rev-PHID-DREV-3a3igtospgxnbxxuhxe3-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50581/
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
  As part of requiring Python 3.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -3790,9 +3790,7 @@ 
             return self._hgpath
 
         cmd = b'"%s" -c "import mercurial; print (mercurial.__path__[0])"'
-        cmd = cmd % PYTHON
-        if PYTHON3:
-            cmd = _bytes2sys(cmd)
+        cmd = _bytes2sys(cmd % PYTHON)
 
         p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
         out, err = p.communicate()