def test_vector3_normalize(): vec = (5, 2.5, 5) result = [0.667, 0.333, 0.667] to_check = linalg.vector_normalize(vec, decimals=3) assert to_check == result
def test_vector_normalize2(): with pytest.raises(ValueError): vec = (0, 0) linalg.vector_normalize(vec)
def test_vector_normalize3(): with pytest.raises(TypeError): linalg.vector_normalize(5)
def test_vector4_normalize(): vec = (5, 2.5, 5, 10) result = [0.4, 0.2, 0.4, 0.8] to_check = linalg.vector_normalize(vec) assert to_check == result