コード例 #1
0
def test_sum_takes_a_list_as_argument():

    sum(30)

    #@raises(ValueError)
    #def test_sum_takes_a_non_empty_list_as_argument():

    sum([3])
コード例 #2
0
def test_sum_takes_a_list_as_argument():

    sum(30)

#@raises(ValueError)
#def test_sum_takes_a_non_empty_list_as_argument():

    sum([3])
コード例 #3
0
def test_sum_a_list_with_3_should_give_3():

    assert_equal(sum([3]), 3)
コード例 #4
0
def test_sum_a_list_with_3_7_5_should_give_15():

    assert_equal(sum([3, 7, 5]), 15)
コード例 #5
0
def test_sum_a_list_with_3_should_give_3():

    assert_equal(sum([3]), 3)
コード例 #6
0
def test_sum_a_list_with_3_7_5_should_give_15():

    assert_equal(sum([3, 7, 5]), 15)
コード例 #7
0
def test_sum_takes_a_non_empty_list_as_argument():

    sum([])
コード例 #8
0
def test_sum_takes_a_list_as_argument():

    sum()
コード例 #9
0
def test_empty_list_should_give_0():

    assert_equal(sum([]), 0)
コード例 #10
0
def test_sum_takes_a_non_empty_list_as_argument():

    sum([])
コード例 #11
0
def test_sum_takes_a_list_as_argument():

    sum()
コード例 #12
0
def test_empty_list_should_give_0():

    assert_equal(sum([]), 0)