Esempio n. 1
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:"
    ]
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:"]
def test_mean():
    assert A.get_mean([-1,0,1]) == 0
    assert A.get_mean([0,0,0]) == 0
def test_half():
    assert A.get_second_half([1,2,3]) == [2,3]
    assert A.get_second_half([]) == []
Esempio n. 5
0
def test_mean():
    assert A.list_mean() == 3.5
Esempio n. 6
0
def test_count_ones():
    assert A.list_count_ones() == 2
Esempio n. 7
0
def test_lt3():
    assert A.list_lt3() == 4
Esempio n. 8
0
def test_mean():
    assert A.list_mean() == 3.5
Esempio n. 9
0
def test_count_ones():
    assert A.list_count_ones() == 2
Esempio n. 10
0
def test_lt3():
    assert A.list_lt3() == 4
Esempio n. 11
0
def test_mean():
    assert A.get_mean([-1, 0, 1]) == 0
    assert A.get_mean([0, 0, 0]) == 0
Esempio n. 12
0
def test_half():
    assert A.get_second_half([1, 2, 3]) == [2, 3]
    assert A.get_second_half([]) == []