Ejemplo n.º 1
0
def test_allpositive():
    val = Avg.absAvg([1, 2, 3, 4, 5])
    assert val == 3
Ejemplo n.º 2
0
def test_input_none():
    with pytest.raises(Exception):
        val = Avg.absAvg(None)
        assert False
Ejemplo n.º 3
0
def test_input_empty():
    with pytest.raises(Exception):
        val = Avg.absAvg([])
        assert False
Ejemplo n.º 4
0
def test_allnegative():
    val = Avg.absAvg([-1, -2, -3, -4, -5])
    assert val == 3