Пример #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:"
    ]
Пример #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
def test_mean():
    assert A.get_mean([-1, 0, 1]) == 0
    assert A.get_mean([0, 0, 0]) == 0
Пример #12
0
def test_half():
    assert A.get_second_half([1, 2, 3]) == [2, 3]
    assert A.get_second_half([]) == []