コード例 #1
0
def test_mathtools_factors_05():
    t = mathtools.factors(6)
    assert t == [1, 2, 3]
コード例 #2
0
def test_mathtools_factors_06():
    t = mathtools.factors(12)
    assert t == [1, 2, 2, 3]
コード例 #3
0
def test_mathtools_factors_03():
    t = mathtools.factors(3)
    assert t == [1, 3]
コード例 #4
0
def test_mathtools_factors_04():
    t = mathtools.factors(4)
    assert t == [1, 2, 2]
コード例 #5
0
def test_mathtools_factors_01():
    with pytest.raises(TypeError):
        mathtools.factors(7.5)
    with pytest.raises(ValueError):
        mathtools.factors(0)
コード例 #6
0
def test_mathtools_factors_02():
    t = mathtools.factors(2)
    assert t == [1, 2]
コード例 #7
0
def test_mathtools_factors_02( ):
    t = mathtools.factors(2)
    assert t == [1, 2]
コード例 #8
0
def test_mathtools_factors_06( ):
    t = mathtools.factors(12)
    assert t == [1, 2, 2, 3]
コード例 #9
0
def test_mathtools_factors_05( ):
    t = mathtools.factors(6)
    assert t == [1, 2, 3]
コード例 #10
0
def test_mathtools_factors_04( ):
    t = mathtools.factors(4)
    assert t == [1, 2, 2]
コード例 #11
0
def test_mathtools_factors_03( ):
    t = mathtools.factors(3)
    assert t == [1, 3]