예제 #1
0
def test_add(a, b):
    add_elements(a, b)
예제 #2
0
def test_wrong_type():
    with pytest.raises(TypeError):
        add_elements([1, 2], 6)
예제 #3
0
def test_add():
    assert add_elements([1, 2], [3, 4]) == [4, 6]
예제 #4
0
def test_add(a, b, answer):
    assert add_elements(a, b) == answer
예제 #5
0
def test_add_elements_2(a , b):
    assert add_elements(a, b) == 
예제 #6
0
def test_add_elements(a, b, c):
    assert add_elements(a, b) == c
예제 #7
0
def test_add(pair_of_lists):
    list1 = pair_of_lists[0]
    list2 = pair_of_lists[1]
    assert add_elements(list1, list2) == [4, 6]