changeset 39046:a450d460774e

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
author Augie Fackler <augie@google.com>
date Thu, 09 Aug 2018 13:34:33 -0400
parents 88b04bd2cbb4
children a1f934573c0b
files tests/test-parseindex2.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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