Commit 08e9b9d0 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Tests][Python] check that piecewise.curve_at_index return a const

parent 3092691d
Pipeline #8085 passed with stage
in 12 minutes and 26 seconds
......@@ -448,6 +448,14 @@ class TestCurves(unittest.TestCase):
pc.derivate(0.4, 2)
pc.is_continuous(0)
pc.is_continuous(1)
# test access to curves :
self.assertTrue(array_equal(pc.curve_at_index(0)(0.5), a(0.5)))
waypoints = array([[3., 4., -3.], [5., 1., 2.]]).transpose()
c = bezier(waypoints, 1.5, 2.)
c0 = pc.curve_at_index(0)
c0 = c # should not have any effect
self.assertTrue(array_equal(pc.curve_at_index(0)(0.5), a(0.5)))
# Test serialization
pc.saveAsText("serialization_pc.test")
pc_test = piecewise()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment