Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
7fbe6397
Verified
Commit
7fbe6397
authored
Nov 16, 2019
by
Justin Carpentier
Browse files
test/python: add test Model
parent
c4eb44c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
unittest/python/CMakeLists.txt
View file @
7fbe6397
SET
(
${
PROJECT_NAME
}
_PYTHON_TESTS
bindings
bindings_model
bindings_data
bindings_com
bindings_com_velocity_derivatives
...
...
unittest/python/bindings_model.py
0 → 100644
View file @
7fbe6397
import
unittest
import
pinocchio
as
pin
pin
.
switchToNumpyMatrix
()
from
test_case
import
TestCase
class
TestModel
(
TestCase
):
def
setUp
(
self
):
self
.
model
=
pin
.
buildSampleModelHumanoidRandom
()
def
test_pickle
(
self
):
import
pickle
model
=
self
.
model
pickle
.
dump
(
model
,
open
(
"save.p"
,
"wb"
)
)
model_copy
=
pickle
.
load
(
open
(
"save.p"
,
"rb"
)
)
self
.
assertTrue
(
model
==
model_copy
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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