Ejemplo n.º 1
0
def test_prime():
    g = gen.prime()
    for val in [
            2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
            67, 71, 73, 79, 83, 89, 97
    ]:
        assert next(g) == val
def test_prime():
    y = generator.prime()
    for value in [
            2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
            67, 71, 73, 79, 83, 89, 97
    ]:
        assert next(y) == value
Ejemplo n.º 3
0
def test_prime():
    g = gen.prime()

    assert next(g) == 2
    assert next(g) == 3
    assert next(g) == 5
    assert next(g) == 7
    assert next(g) == 11
    assert next(g) == 13
    assert next(g) == 17
    assert next(g) == 19
    assert next(g) == 23
Ejemplo n.º 4
0
def test_prime():
    g = gen.prime()

    assert g.next() == 2
    assert g.next() == 3
    assert g.next() == 5
    assert g.next() == 7
    assert g.next() == 11
    assert g.next() == 13
    assert g.next() == 17
    assert g.next() == 19
    assert g.next() == 23
def test_prime():
    g = gs.prime()
    for val in [2, 3, 5, 7, 11, 13, 17, 19, 23]:
        assert next(g) == val
Ejemplo n.º 6
0
def test_prime():
    g = gs.prime()
    for val in [2, 3, 5, 7, 11, 13, 17, 19, 23]:
        assert next(g) == val