Exemplo n.º 1
0
def test_vector_setters_exception(value, exception_type):
    vector = Vector()

    with pytest.raises(exception_type):
        vector.x = value

    with pytest.raises(exception_type):
        vector.y = value
Exemplo n.º 2
0
def test_vector_setters():
    vector = Vector()

    vector.x = 42.0
    vector.y = 42.0

    assert vector.x == 42.0
    assert vector.y == 42.0