tests: restore Python 3 compat in test-parseindex2.py
authorAugie Fackler <augie@google.com>
Thu, 09 Aug 2018 13:34:33 -0400
changeset 39046 a450d460774e
parent 39045 88b04bd2cbb4
child 39047 a1f934573c0b
tests: restore Python 3 compat in test-parseindex2.py I think this was previously getting lucky in Python 3, and would have stacktraced if something failed. Now that failure messages are eagerly computed, this turned into a problem. Differential Revision: https://phab.mercurial-scm.org/D4182
tests/test-parseindex2.py
--- a/tests/test-parseindex2.py	Thu Aug 09 13:26:28 2018 -0400
+++ b/tests/test-parseindex2.py	Thu Aug 09 13:34:33 2018 -0400
@@ -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