Mercurial > hg
diff tests/test-manifest.py @ 32534:0048a852b6aa
tests: make test-manifest finish importing in Python 3
The test is still broken, but now it executes.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 28 May 2017 18:08:36 -0400 |
parents | d68f3d6bc214 |
children | 0ff336a42c39 |
line wrap: on
line diff
--- a/tests/test-manifest.py Sun May 28 18:08:14 2017 -0400 +++ b/tests/test-manifest.py Sun May 28 18:08:36 2017 -0400 @@ -92,11 +92,15 @@ HUGE_MANIFEST_ENTRIES = 200001 +izip = getattr(itertools, 'izip', zip) +if 'xrange' not in globals(): + xrange = range + A_HUGE_MANIFEST = ''.join(sorted( 'file%d\0%s%s\n' % (i, h, f) for i, h, f in - itertools.izip(xrange(200001), - itertools.cycle((HASH_1, HASH_2)), - itertools.cycle(('', 'x', 'l'))))) + izip(xrange(200001), + itertools.cycle((HASH_1, HASH_2)), + itertools.cycle(('', 'x', 'l'))))) class basemanifesttests(object): def parsemanifest(self, text):