tests/test-ancestor.py
changeset 23329 c6cd4b8b76f8
parent 23328 3a7d9c0c57a5
child 23330 37c3731d8a58
equal deleted inserted replaced
23328:3a7d9c0c57a5 23329:c6cd4b8b76f8
    75            (revs, stoprev, inclusive))
    75            (revs, stoprev, inclusive))
    76     return ancestor.lazyancestors(graph.get, revs, stoprev=stoprev,
    76     return ancestor.lazyancestors(graph.get, revs, stoprev=stoprev,
    77                                   inclusive=inclusive)
    77                                   inclusive=inclusive)
    78 
    78 
    79 def printlazyancestors(s, l):
    79 def printlazyancestors(s, l):
    80     print [n for n in l if n in s]
    80     print 'membership: %r' % [n for n in l if n in s]
       
    81     print 'iteration:  %r' % list(s)
    81 
    82 
    82 def test_lazyancestors():
    83 def test_lazyancestors():
    83     # Empty revs
    84     # Empty revs
    84     s = genlazyancestors([])
    85     s = genlazyancestors([])
    85     printlazyancestors(s, [3, 0, -1])
    86     printlazyancestors(s, [3, 0, -1])