def test_index(): l = Loop(range(9)) for x in l(3): print l.index, l.count, l.isfirst(), l.islast(), l.iseven(), x print l.isempty()
def test_empty(): l = Loop(range(0)) for x in l(): pass eq_(l.isempty(), True)