示例#1
0
def test_invalid_number_list_02():
    assert sum67("3432432432@!#") == "Not a list"
示例#2
0
def test_valid_number_list_09():
    assert sum67([0]) == 0
示例#3
0
def test_invalid_number_list_01():
    assert sum67(['a', 'c', 'f']) == "Invalid item. Only numbers accepted"
示例#4
0
def test_valid_number_list_07():
    assert sum67([1, 2, 2]) == 5
示例#5
0
def test_valid_number_list_08():
    assert sum67([1, 1, 0, 6, 7, 1, 7]) == 10
示例#6
0
def test_valid_number_list_04():
    assert sum67([6, 1, 7, 1, 2]) == 3
示例#7
0
def test_valid_number_list_03():
    assert sum67([1, 1, 6, 7, 2]) == 4
示例#8
0
def test_valid_number_list_02():
    assert sum67([1, 2, 2, 6, 99, 99, 7]) == 5
示例#9
0
def test_no_arguments():
    with pytest.raises(TypeError) as e_info:
        sum67()
示例#10
0
def test_empty_string():
    assert sum67("") == "Not a list"