py3: use range instead of xrange on py3 in tests/test-ui-verbosity.py
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 18 Feb 2018 18:22:15 +0530
changeset 36294 2507bf180413
parent 36293 8591d6afc629
child 36295 19a04ca90413
py3: use range instead of xrange on py3 in tests/test-ui-verbosity.py xrange is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2332
tests/test-ui-verbosity.py
--- a/tests/test-ui-verbosity.py	Sun Feb 18 18:20:57 2018 +0530
+++ b/tests/test-ui-verbosity.py	Sun Feb 18 18:22:15 2018 +0530
@@ -2,9 +2,13 @@
 
 import os
 from mercurial import (
+    pycompat,
     ui as uimod,
 )
 
+if pycompat.ispy3:
+    xrange = range
+
 hgrc = os.environ['HGRCPATH']
 f = open(hgrc)
 basehgrc = f.read()