py3: use range instead of xrange on py3 in tests/test-filecache.py
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 18 Feb 2018 17:42:33 +0530
changeset 36286 daa5f47558cf
parent 36285 3ec9afb951a0
child 36287 065445b44724
py3: use range instead of xrange on py3 in tests/test-filecache.py xrange is not present on py3. Differential Revision: https://phab.mercurial-scm.org/D2324
tests/test-filecache.py
--- a/tests/test-filecache.py	Sun Feb 18 17:41:56 2018 +0530
+++ b/tests/test-filecache.py	Sun Feb 18 17:42:33 2018 +0530
@@ -11,11 +11,15 @@
     extensions,
     hg,
     localrepo,
+    pycompat,
     ui as uimod,
     util,
     vfs as vfsmod,
 )
 
+if pycompat.ispy3:
+    xrange = range
+
 class fakerepo(object):
     def __init__(self):
         self._filecache = {}