예제 #1
0
def test_add_permutated(a, b):
    assert add(a, b) == a+b
    assert add(a, b) != a+b+1
    assert add(a, b) != a+b-1
예제 #2
0
def test_add_true(input_args, expected):
    assert add(input_args[0], input_args[1]) == expected
예제 #3
0
def test_add_with_ids(input_args, expected):
    assert add(input_args[0], input_args[1]) == expected
예제 #4
0
def test_add_false(input_args, expected):
    assert add(input_args[0], input_args[1]) != expected
예제 #5
0
def test__this_test_is_marked_as_failing_but_does_not_fail():
    assert add(3, 2) == 5
예제 #6
0
def test__this_test_will_fail_and_we_know_it():
    assert add(3, "2") == 5
예제 #7
0
def test__this_is_an_extensive_test_that_is_not_fully_implemented_yet():
    assert add(3, 2) == 5
예제 #8
0
def test_add():
    assert add(1, 1) == 2
    assert add(3, 2) == 5
    assert add(2, 3) == 5
    assert add(2.5, 3.3) == 5.8