示例#1
0
def test_sum_of_primes_empty_list():
    assert sum_of_primes([]) == 0
示例#2
0
def test_sum_of_primes_mixed_list(numbers, result):
    assert sum_of_primes(numbers) == result
示例#3
0
def test_sum_primes(n, output):
    assert sum_of_primes(n) == output
示例#4
0
def test_sum_of_primes_mixed_list():
    assert sum_of_primes([11, 15, 17, 18, 20, 100]) == 28
示例#5
0
def test_sum_of_primes_all_primes():
    assert sum_of_primes([2, 5, 7, 89]) == 103
示例#6
0
def test_sum_of_primes_some_primes():
    assert sum_of_primes([2, 4, 5, 89, 100]) == 96
示例#7
0
def test_sum_of_primes_no_primes():
    assert sum_of_primes([4, 6, 8, 100]) == 0