changeset 36285:3ec9afb951a0

py3: use range instead on xrange on py3 in tests/test-atomictempfile.py xrange is not available on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2323
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Feb 2018 17:41:56 +0530
parents d157b5bfaef0
children daa5f47558cf
files tests/test-atomictempfile.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-atomictempfile.py	Sun Feb 18 17:37:47 2018 +0530
+++ b/tests/test-atomictempfile.py	Sun Feb 18 17:41:56 2018 +0530
@@ -7,10 +7,14 @@
 import unittest
 
 from mercurial import (
+    pycompat,
     util,
 )
 atomictempfile = util.atomictempfile
 
+if pycompat.ispy3:
+    xrange = range
+
 class testatomictempfile(unittest.TestCase):
     def setUp(self):
         self._testdir = tempfile.mkdtemp('atomictempfiletest')