D4182: tests: restore Python 3 compat in test-parseindex2.py
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Aug 9 17:42:17 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
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,
)
@@ -200,7 +201,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