changeset 44487:69ae64637be5

tests: use native string type for parsed hghave log lines Before this change, on Python 2, the parsed messages were decoded to unicode, causing an implicit conversion from unicode to str later.
author Manuel Jacob <me@manueljacob.de>
date Mon, 09 Mar 2020 05:19:02 +0100
parents 408a4eb41453
children a08bbdf839ae
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Mar 06 10:27:38 2020 +0100
+++ b/tests/run-tests.py	Mon Mar 09 05:19:02 2020 +0100
@@ -2067,12 +2067,10 @@
         for line in lines:
             if line.startswith(TTest.SKIPPED_PREFIX):
                 line = line.splitlines()[0]
-                missing.append(
-                    line[len(TTest.SKIPPED_PREFIX) :].decode('utf-8')
-                )
+                missing.append(_bytes2sys(line[len(TTest.SKIPPED_PREFIX) :]))
             elif line.startswith(TTest.FAILED_PREFIX):
                 line = line.splitlines()[0]
-                failed.append(line[len(TTest.FAILED_PREFIX) :].decode('utf-8'))
+                failed.append(_bytes2sys(line[len(TTest.FAILED_PREFIX) :]))
 
         return missing, failed