Mercurial > public > mercurial-scm > hg
diff tests/test-atomictempfile.py @ 49285:56f98406831b
py3: remove xrange() compatibility code
Some code used its own xrange() compatibility code instead of
pycompat.xrange().
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Sun, 29 May 2022 15:32:43 +0200 |
parents | 6000f5b25c9b |
children |
line wrap: on
line diff
--- a/tests/test-atomictempfile.py Sun May 29 15:17:27 2022 +0200 +++ b/tests/test-atomictempfile.py Sun May 29 15:32:43 2022 +0200 @@ -6,15 +6,11 @@ import unittest from mercurial import ( - pycompat, util, ) atomictempfile = util.atomictempfile -if pycompat.ispy3: - xrange = range - class testatomictempfile(unittest.TestCase): def setUp(self): @@ -68,7 +64,7 @@ # try some times, because reproduction of ambiguity depends on # "filesystem time" - for i in xrange(5): + for i in range(5): atomicwrite(False) oldstat = os.stat(self._filename) if oldstat[stat.ST_CTIME] != oldstat[stat.ST_MTIME]: @@ -79,7 +75,7 @@ # repeat atomic write with checkambig=True, to examine # whether st_mtime is advanced multiple times as expected - for j in xrange(repetition): + for j in range(repetition): atomicwrite(True) newstat = os.stat(self._filename) if oldstat[stat.ST_CTIME] != newstat[stat.ST_CTIME]: