tests/test-ancestor.py
changeset 32861 20d70df64e93
parent 32291 bd872f64a8ba
child 32893 a8dfa35a4130
--- a/tests/test-ancestor.py	Fri Jun 16 00:36:17 2017 +0530
+++ b/tests/test-ancestor.py	Fri Jun 16 01:24:31 2017 +0530
@@ -13,10 +13,15 @@
     ancestor,
     debugcommands,
     hg,
+    pycompat,
     ui as uimod,
     util,
 )
 
+if pycompat.ispy3:
+    long = int
+    xrange = range
+
 def buildgraph(rng, nodes=100, rootprob=0.05, mergeprob=0.2, prevprob=0.7):
     '''nodes: total number of nodes in the graph
     rootprob: probability that a new node (not 0) will be a root