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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Aug 9 13:46:03 EDT 2018


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

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



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


More information about the Mercurial-devel mailing list