Patchwork D4182: tests: restore Python 3 compat in test-parseindex2.py

login
register
mail settings
Submitter phabricator
Date Aug. 9, 2018, 5:46 p.m.
Message ID <2eaf6d2a4a18e48e471713cb2a3c3d79@localhost.localdomain>
Download mbox | patch
Permalink /patch/33475/
State Not Applicable
Headers show

Comments

phabricator - Aug. 9, 2018, 5:46 p.m.
durin42 updated this revision to Diff 10125.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4182?vs=10114&id=10125

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

AFFECTED FILES
  tests/test-parseindex2.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -15,6 +15,7 @@ 
     nullrev,
 )
 from mercurial import (
+    node as nodemod,
     policy,
     pycompat,
 )
@@ -201,7 +202,7 @@ 
             try:
                 self.assertEqual(
                     ix[r[7]], i,
-                    'Reverse lookup inconsistent for %r' % r[7].encode('hex'))
+                    'Reverse lookup inconsistent for %r' % nodemod.hex(r[7]))
             except TypeError:
                 # pure version doesn't support this
                 break