def test_intsum2():

    g = gen.intsum2()

    assert next(g) == 0
    assert next(g) == 1
    assert next(g) == 3
    assert next(g) == 6
    assert next(g) == 10
    assert next(g) == 15
Ejemplo n.º 2
0
def test_intsum2():
    
    g = gen.intsum2()

    assert g.next() == 0
    assert g.next() == 1
    assert g.next() == 3
    assert g.next() == 6
    assert g.next() == 10
    assert g.next() == 15
def test_intsum2():
    g = gs.intsum2()
    for val in [0, 1, 3, 6, 10]:
        assert next(g) == val
Ejemplo n.º 4
0
def test_intsum2():
    g = gs.intsum2()
    for val in [0, 1, 3, 6, 10]:
        assert next(g) == val