Mercurial > public > mercurial-scm > hg-stable
diff tests/test-parseindex2.py @ 46114:59fa3890d40a
node: import symbols explicitly
There is no point in lazy importing mercurial.node, it is used all over
the place anyway. So consistently import the used symbols directly.
Fix one file using symbols indirectly via mercurial.revlog.
Differential Revision: https://phab.mercurial-scm.org/D9480
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 01 Dec 2020 21:54:46 +0100 |
parents | e7a4c018b563 |
children | 913485776542 |
line wrap: on
line diff
--- a/tests/test-parseindex2.py Sun Dec 13 18:29:22 2020 -0800 +++ b/tests/test-parseindex2.py Tue Dec 01 21:54:46 2020 +0100 @@ -12,11 +12,12 @@ import unittest from mercurial.node import ( + bin, + hex, nullid, nullrev, ) from mercurial import ( - node as nodemod, policy, pycompat, ) @@ -232,7 +233,7 @@ self.assertEqual( ix[r[7]], i, - 'Reverse lookup inconsistent for %r' % nodemod.hex(r[7]), + 'Reverse lookup inconsistent for %r' % hex(r[7]), ) except TypeError: # pure version doesn't support this @@ -255,7 +256,7 @@ if rev == nullrev: return b'\xff\xff\xff\xff' else: - return nodemod.bin('%08x' % rev) + return bin('%08x' % rev) def appendrev(p1, p2=nullrev): # node won't matter for this test, let's just make sure