Example #1
0
def test_mathtools_factors_05():
    t = mathtools.factors(6)
    assert t == [1, 2, 3]
Example #2
0
def test_mathtools_factors_06():
    t = mathtools.factors(12)
    assert t == [1, 2, 2, 3]
Example #3
0
def test_mathtools_factors_03():
    t = mathtools.factors(3)
    assert t == [1, 3]
Example #4
0
def test_mathtools_factors_04():
    t = mathtools.factors(4)
    assert t == [1, 2, 2]
Example #5
0
def test_mathtools_factors_01():
    with pytest.raises(TypeError):
        mathtools.factors(7.5)
    with pytest.raises(ValueError):
        mathtools.factors(0)
Example #6
0
def test_mathtools_factors_02():
    t = mathtools.factors(2)
    assert t == [1, 2]
def test_mathtools_factors_02( ):
    t = mathtools.factors(2)
    assert t == [1, 2]
def test_mathtools_factors_06( ):
    t = mathtools.factors(12)
    assert t == [1, 2, 2, 3]
def test_mathtools_factors_05( ):
    t = mathtools.factors(6)
    assert t == [1, 2, 3]
def test_mathtools_factors_04( ):
    t = mathtools.factors(4)
    assert t == [1, 2, 2]
def test_mathtools_factors_03( ):
    t = mathtools.factors(3)
    assert t == [1, 3]