# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-06-15 19:54:31 # Node ID 20d70df64e93a474d6d685e44dc4a7bca0972552 # Parent f22f39d56bb5e5127a4eb61496c7c1293196099c py3: alias long to int and xrange to range in test-ancestor.py on Python 3 diff --git a/tests/test-ancestor.py b/tests/test-ancestor.py --- a/tests/test-ancestor.py +++ b/tests/test-ancestor.py @@ -13,10 +13,15 @@ from mercurial import ( 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