Beispiel #1
0
def test_average():
    assert 2.25 == average(1, '3', 2.0, pytest, 3, 'x')
    assert 2 == average((1, '3', 2.0, pytest, 3, 'x'))

    assert -0.1 == average((-0.1, None, 'x', True))

    assert DIV0 == average(['x'])

    assert VALUE_ERROR == average(VALUE_ERROR)
    assert VALUE_ERROR == average((2, VALUE_ERROR))

    assert DIV0 == average(DIV0)
    assert DIV0 == average((2, DIV0))
Beispiel #2
0
def test_average():
    assert 2 == average(1, '3', 2.0, pytest, 3, 'x')
    assert 2 == average((1, '3', (2.0, pytest, 3), 'x'))

    assert -0.1 == average((-0.1, None, 'x', True))

    assert DIV0 == average(['x'])

    assert VALUE_ERROR == average(VALUE_ERROR)
    assert VALUE_ERROR == average((2, VALUE_ERROR))

    assert DIV0 == average(DIV0)
    assert DIV0 == average((2, DIV0))