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
--- 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