tests/test-ancestor.py
changeset 49294 003c0732c055
parent 49285 56f98406831b
child 50928 d718eddf01d9
--- a/tests/test-ancestor.py	Tue May 31 02:04:24 2022 +0200
+++ b/tests/test-ancestor.py	Sun May 29 16:12:27 2022 +0200
@@ -11,14 +11,10 @@
     ancestor,
     debugcommands,
     hg,
-    pycompat,
     ui as uimod,
     util,
 )
 
-if pycompat.ispy3:
-    long = int
-
 
 def buildgraph(rng, nodes=100, rootprob=0.05, mergeprob=0.2, prevprob=0.7):
     """nodes: total number of nodes in the graph
@@ -451,13 +447,13 @@
     opts, args = getopt.getopt(sys.argv[1:], 's:', ['seed='])
     for o, a in opts:
         if o in ('-s', '--seed'):
-            seed = long(a, base=0)  # accepts base 10 or 16 strings
+            seed = int(a, base=0)  # accepts base 10 or 16 strings
 
     if seed is None:
         try:
-            seed = long(binascii.hexlify(os.urandom(16)), 16)
+            seed = int(binascii.hexlify(os.urandom(16)), 16)
         except AttributeError:
-            seed = long(time.time() * 1000)
+            seed = int(time.time() * 1000)
 
     rng = random.Random(seed)
     test_missingancestors_explicit()