def test_intsum():
    y = generator.intsum()
    assert next(y) == 0
    assert next(y) == 1
    assert next(y) == 3
    assert next(y) == 6
    assert next(y) == 10
    assert next(y) == 15
예제 #2
0
    def test_intsum(self):
        g = gen.intsum(10)

        assert next(g) == 0
        assert next(g) == 1
        assert next(g) == 3
        assert next(g) == 6
        assert next(g) == 10
        assert next(g) == 15
예제 #3
0
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 = gen.intsum()

    assert next(g) == 0
    assert next(g) == 1
    assert next(g) == 2
    assert next(g) == 3
    assert next(g) == 4
    assert next(g) == 5
예제 #5
0
def test_intsum():
    
    g = gen.intsum()

    assert g.next() == 0
    assert g.next() == 1
    assert g.next() == 3
    assert g.next() == 6
    assert g.next() == 10
    assert g.next() == 15
예제 #6
0
def test_intsum2():

    g2 = gen.intsum()

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