From d6a0c0b8d6652c78d55afd9024b932c8b70eb1fd Mon Sep 17 00:00:00 2001 From: pFernbach <pierre.fernbach@gmail.com> Date: Tue, 16 Apr 2019 14:32:29 +0200 Subject: [PATCH] [test][python] add a (failling) test highlithing error with Bezier of degree 0 --- python/test/test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/test/test.py b/python/test/test.py index 9f61b24..42d5b2f 100644 --- a/python/test/test.py +++ b/python/test/test.py @@ -22,6 +22,13 @@ class TestCurve(unittest.TestCase): # - Functions : constructor, min, max, derivate,compute_derivate, compute_primitive # - Variables : degree, nbWayPoints __EPS = 1e-6 + waypoints = matrix([[1., 2., 3.]]).T + a = bezier(waypoints,2.) + t = 0. + while t < 2.: + assert_allclose(a(t),matrix([1., 2., 3.]).T) + t += 0.1 + waypoints = matrix([[1., 2., 3.], [4., 5., 6.]]).transpose() waypoints6 = matrix([[1., 2., 3., 7., 5., 5.], [4., 5., 6., 4., 5., 6.]]).transpose() time_waypoints = matrix([0., 1.]).transpose() -- GitLab