diff tests/test-filecache.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 642e31cb55f0
children 09367b3d23d8
line wrap: on
line diff
--- a/tests/test-filecache.py	Sun May 29 15:17:27 2022 +0200
+++ b/tests/test-filecache.py	Sun May 29 15:32:43 2022 +0200
@@ -31,9 +31,6 @@
     vfs as vfsmod,
 )
 
-if pycompat.ispy3:
-    xrange = range
-
 
 class fakerepo:
     def __init__(self):
@@ -214,7 +211,7 @@
 
     # try some times, because reproduction of ambiguity depends on
     # "filesystem time"
-    for i in xrange(5):
+    for i in range(5):
         fp = open(filename, 'w')
         fp.write('FOO')
         fp.close()
@@ -228,7 +225,7 @@
 
         # repeat changing via checkambigatclosing, to examine whether
         # st_mtime is advanced multiple times as expected
-        for i in xrange(repetition):
+        for i in range(repetition):
             # explicit closing
             fp = vfsmod.checkambigatclosing(open(filename, 'a'))
             fp.write('FOO')