Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
ndcurves
Commits
08e9b9d0
Commit
08e9b9d0
authored
Jan 22, 2020
by
Pierre Fernbach
Browse files
[Tests][Python] check that piecewise.curve_at_index return a const
parent
3092691d
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/test/test.py
View file @
08e9b9d0
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment