tests: avoid implicit conversion of str to unicode
On Python 2, str.encode('ascii') implicitly converts the string to unicode and
then back to str.
Since the converted value is a path, _bytespath can be used instead.
--- a/tests/run-tests.py Thu Mar 05 18:10:19 2020 +0100
+++ b/tests/run-tests.py Thu Mar 05 18:19:21 2020 +0100
@@ -3008,7 +3008,7 @@
os.makedirs(self._tmpbindir)
normbin = os.path.normpath(os.path.abspath(whg))
- normbin = normbin.replace(os.sep.encode('ascii'), b'/')
+ normbin = normbin.replace(_bytespath(os.sep), b'/')
# Other Python scripts in the test harness need to
# `import mercurial`. If `hg` is a Python script, we assume