コード例 #1
0
ファイル: test_A.py プロジェクト: nagoyazhou/python
def test_arthur():
    assert A.prepend_arthur([0]) == [
        "In the name of Arthur of the House Pendragon, the first of his name, King of the Britons, Defeater of the Saxons, and Sovereign of all England:",
        0
    ]
    assert A.prepend_arthur([]) == [
        "In the name of Arthur of the House Pendragon, the first of his name, King of the Britons, Defeater of the Saxons, and Sovereign of all England:"
    ]
コード例 #2
0
def test_arthur():
    assert A.prepend_arthur([0]) == ["In the name of Arthur of the House Pendragon, the first of his name, King of the Britons, Defeater of the Saxons, and Sovereign of all England:", 0]
    assert A.prepend_arthur([]) == ["In the name of Arthur of the House Pendragon, the first of his name, King of the Britons, Defeater of the Saxons, and Sovereign of all England:"]
コード例 #3
0
def test_mean():
    assert A.get_mean([-1,0,1]) == 0
    assert A.get_mean([0,0,0]) == 0
コード例 #4
0
def test_half():
    assert A.get_second_half([1,2,3]) == [2,3]
    assert A.get_second_half([]) == []
コード例 #5
0
def test_mean():
    assert A.list_mean() == 3.5
コード例 #6
0
def test_count_ones():
    assert A.list_count_ones() == 2
コード例 #7
0
def test_lt3():
    assert A.list_lt3() == 4
コード例 #8
0
def test_mean():
    assert A.list_mean() == 3.5
コード例 #9
0
def test_count_ones():
    assert A.list_count_ones() == 2
コード例 #10
0
def test_lt3():
    assert A.list_lt3() == 4
コード例 #11
0
ファイル: test_A.py プロジェクト: nagoyazhou/python
def test_mean():
    assert A.get_mean([-1, 0, 1]) == 0
    assert A.get_mean([0, 0, 0]) == 0
コード例 #12
0
ファイル: test_A.py プロジェクト: nagoyazhou/python
def test_half():
    assert A.get_second_half([1, 2, 3]) == [2, 3]
    assert A.get_second_half([]) == []