Exemplo n.º 1
0
def test_number_of_divisors():
    assert len(euler.divisors(15)) == euler.number_of_divisors(15)
    assert len(euler.divisors(21)) == euler.number_of_divisors(21)
    assert len(euler.divisors(28)) == euler.number_of_divisors(28)
    assert len(euler.divisors(2012)) == euler.number_of_divisors(2012)
Exemplo n.º 2
0
def test_number_of_divisors():
    assert len(euler.divisors(15)) == euler.number_of_divisors(15)
    assert len(euler.divisors(21)) == euler.number_of_divisors(21)
    assert len(euler.divisors(28)) == euler.number_of_divisors(28)
    assert len(euler.divisors(2012)) == euler.number_of_divisors(2012)
Exemplo n.º 3
0
def test_divisors():
    assert euler.divisors(15) == [1, 3, 5, 15]
    assert euler.divisors(21) == [1, 3, 7, 21]
    assert euler.divisors(28) == [1, 2, 4, 7, 14, 28]
Exemplo n.º 4
0
def test_divisors():
    assert euler.divisors(15) == [1, 3, 5, 15]
    assert euler.divisors(21) == [1, 3, 7, 21]
    assert euler.divisors(28) == [1, 2, 4, 7, 14, 28]