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
Pierre Fernbach
curves
Commits
ab0b70f3
Commit
ab0b70f3
authored
Aug 12, 2019
by
Pierre Fernbach
Browse files
[python][test] add test to check if an error is correctly raised when tmin > tmax
parent
ae24267e
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/test/test.py
View file @
ab0b70f3
...
...
@@ -159,6 +159,25 @@ class TestCurves(unittest.TestCase):
self
.
assertTrue
(
isclose
(
polC2
.
derivate
(
max
,
1
),
dp1
).
all
())
self
.
assertTrue
(
isclose
(
polC2
.
derivate
(
min
,
2
),
ddp0
).
all
())
self
.
assertTrue
(
isclose
(
polC2
.
derivate
(
max
,
2
),
ddp1
).
all
())
# check that the exception are correctly raised :
try
:
polC0
=
polynomial
(
p0
,
p1
,
max
,
min
)
self
.
assertTrue
(
False
)
# should never get there
except
ValueError
:
pass
try
:
polC1
=
polynomial
(
p0
,
dp0
,
p1
,
dp1
,
max
,
min
)
self
.
assertTrue
(
False
)
# should never get there
except
ValueError
:
pass
try
:
polC2
=
polynomial
(
p0
,
dp0
,
ddp0
,
p1
,
dp1
,
ddp1
,
max
,
min
)
self
.
assertTrue
(
False
)
# should never get there
except
ValueError
:
pass
return
def
test_cubic_hermite_spline
(
self
):
...
...
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