def test_intsum(): g = gen.intsum() assert next(g) == 0 assert next(g) == 1 assert next(g) == 3 assert next(g) == 6 assert next(g) == 10 assert next(g) == 15
def test_intsum(): g = gs.intsum() for val in [0, 1, 3, 6, 10]: assert next(g) == val