--- a/tests/test-ancestor.py Sun Nov 16 00:39:29 2014 -0800
+++ b/tests/test-ancestor.py Fri Nov 14 17:21:00 2014 -0800
@@ -45,6 +45,8 @@
def __init__(self, ancs, bases):
self.ancs = ancs
self.bases = set(bases)
+ def addbases(self, newbases):
+ self.bases.update(newbases)
def missingancestors(self, revs):
res = set()
for rev in revs:
@@ -97,6 +99,11 @@
naiveinc = naiveincrementalmissingancestors(ancs, bases)
seq = []
for _ in xrange(inccount):
+ if rng.random() < 0.2:
+ newbases = samplerevs(graphnodes)
+ seq.append(('addbases', newbases))
+ inc.addbases(newbases)
+ naiveinc.addbases(newbases)
revs = samplerevs(graphnodes)
seq.append(('missingancestors', revs))
h = inc.missingancestors(revs)