changeset 38128:3de58f50afa2

tests: fix test-parseindex2 on Python 3 parsers.versionerrortext is a sysstr, but it's only ever used in this test on the Python side, so I'm okay to just handle it like this. Differential Revision: https://phab.mercurial-scm.org/D3622
author Augie Fackler <augie@google.com>
date Sat, 19 May 2018 15:53:31 -0400
parents e504fa630860
children f97c83d94911
files tests/test-parseindex2.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-parseindex2.py	Sat May 19 15:47:32 2018 -0400
+++ b/tests/test-parseindex2.py	Sat May 19 15:53:31 2018 -0400
@@ -15,6 +15,7 @@
 )
 from mercurial import (
     policy,
+    pycompat,
 )
 
 parsers = policy.importmod(r'parsers')
@@ -149,7 +150,7 @@
 def testversionfail(testnumber, hexversion):
     stdout, stderr = importparsers(hexversion)
     # We include versionerrortext to distinguish from other ImportErrors.
-    errtext = "ImportError: %s" % parsers.versionerrortext
+    errtext = b"ImportError: %s" % pycompat.sysbytes(parsers.versionerrortext)
     if errtext not in stdout:
         printhexfail(testnumber, hexversion, stdout,
                      expected="stdout to contain %r" % errtext)