D2324: py3: use range instead of xrange on py3 in tests/test-filecache.py

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Feb 18 08:29:56 EST 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  xrange is not present on py3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2324

AFFECTED FILES
  tests/test-filecache.py

CHANGE DETAILS

diff --git a/tests/test-filecache.py b/tests/test-filecache.py
--- a/tests/test-filecache.py
+++ b/tests/test-filecache.py
@@ -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 = {}



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list