def test_from_vectors(array_point, array_a, array_b, plane_expected): plane = Plane.from_vectors(array_point, array_a, array_b) assert plane.is_close(plane_expected) # Also ensure that the vector is exactly as expected. assert plane.vector.is_close(plane_expected.vector)
def test_from_vectors_failure(array_point, array_a, array_b): message_expected = "The vectors must not be parallel." with pytest.raises(ValueError, match=message_expected): Plane.from_vectors(array_point, array_a, array_b)