# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-06-17 09:08:02 # Node ID a8dfa35a41308a76a0b230d2d4dd3b77a6b20206 # Parent a7851519ea02b6366ff473f43ed4d69258d09caf py3: pass range() into list() to get one explicitly range() on python 3 returns a generator whereas on python 2 returns a list. So to get a list on python 3, we passed it into list() diff --git a/tests/test-ancestor.py b/tests/test-ancestor.py --- a/tests/test-ancestor.py +++ b/tests/test-ancestor.py @@ -42,7 +42,7 @@ def buildgraph(rng, nodes=100, rootprob= p1 = i - 1 else: p1 = rng.randrange(i - 1) - p2 = rng.choice(range(0, p1) + range(p1 + 1, i)) + p2 = rng.choice(list(range(0, p1)) + list(range(p1 + 1, i))) graph[i] = [p1, p2] elif rng.random() < prevprob: graph[i] = [i - 1]