tests: unconditionalize _bytes2sys()
As part of requiring Python 3.
Differential Revision: https://phab.mercurial-scm.org/D12241
--- a/tests/run-tests.py Sun Feb 20 13:23:21 2022 -0700
+++ b/tests/run-tests.py Sun Feb 20 13:24:25 2022 -0700
@@ -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()