--- a/tests/test-atomictempfile.py Thu Jun 16 15:15:03 2022 +0200
+++ b/tests/test-atomictempfile.py Thu Jun 16 15:28:54 2022 +0200
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
import glob
import os
import shutil
@@ -8,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):
@@ -70,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]:
@@ -81,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]: