Mercurial > hg
changeset 32861:20d70df64e93
py3: alias long to int and xrange to range in test-ancestor.py on Python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 16 Jun 2017 01:24:31 +0530 |
parents | f22f39d56bb5 |
children | e4a43b810528 |
files | tests/test-ancestor.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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