D2323: py3: use range instead on xrange on py3 in tests/test-atomictempfile.py

2018-02-18 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3ec9afb951a0: py3: use range instead on xrange on py3 in 
tests/test-atomictempfile.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2323?vs=5852=5868

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

AFFECTED FILES
  tests/test-atomictempfile.py

CHANGE DETAILS

diff --git a/tests/test-atomictempfile.py b/tests/test-atomictempfile.py
--- a/tests/test-atomictempfile.py
+++ b/tests/test-atomictempfile.py
@@ -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')



To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2323: py3: use range instead on xrange on py3 in tests/test-atomictempfile.py

2018-02-18 Thread pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  xrange is not available on Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-atomictempfile.py

CHANGE DETAILS

diff --git a/tests/test-atomictempfile.py b/tests/test-atomictempfile.py
--- a/tests/test-atomictempfile.py
+++ b/tests/test-atomictempfile.py
@@ -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')



To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel