Patchwork D3350: tests: fix up a couple of minor bytes inconsistencies in run-tests.py

login
register
mail settings
Submitter phabricator
Date April 14, 2018, 4:32 a.m.
Message ID <differential-rev-PHID-DREV-35avf6fgdkplrnnq2qio-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30980/
State Superseded
Headers show

Comments

phabricator - April 14, 2018, 4:32 a.m.
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Only in the automatic bisection code, so fortunately nothing major is
  amiss. Fixes test-run-tests.t under Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/python3-whitelist
  tests/run-tests.py

CHANGE DETAILS




To: durin42, pulkit, #hg-reviewers
Cc: 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
@@ -2215,10 +2215,11 @@ 
                     'Failed to identify failure point for %s' % test)
                 continue
             dat = m.groupdict()
-            verb = 'broken' if dat['goodbad'] == 'bad' else 'fixed'
+            verb = 'broken' if dat['goodbad'] == b'bad' else 'fixed'
             self.stream.writeln(
                 '%s %s by %s (%s)' % (
-                    test, verb, dat['node'], dat['summary']))
+                    test, verb, dat['node'].decode('ascii'),
+                    dat['summary'].decode('utf8', 'ignore')))
 
     def printtimes(self, times):
         # iolock held by run
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -392,6 +392,7 @@ 
 test-revset-outgoing.t
 test-rollback.t
 test-run-tests.py
+test-run-tests.t
 test-schemes.t
 test-serve.t
 test-setdiscovery.t