Skip to content

Commit 687a889

Browse files
stephane-caronStéphane Caron
authored andcommitted
Fix Pinocchio unit tests (error not caught)
Stretch description failed but exception was not caught by pytest. With unittest it is.
1 parent d0fc674 commit 687a889

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

tests/loaders/test_idyntree.py

100755100644
File mode changed.

tests/loaders/test_pinocchio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import unittest
1919

2020
from robot_descriptions._descriptions import DESCRIPTIONS
21-
2221
from robot_descriptions.loaders.pinocchio import load_robot_description
2322

23+
2424
class TestPinocchio(unittest.TestCase):
2525

2626
"""
@@ -44,6 +44,7 @@ def test(self):
4444

4545
return test
4646

47+
4748
# Add a test function for each URDF description
4849
for name, description in DESCRIPTIONS.items():
4950
if description.has_urdf:

tox.ini

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,48 +46,42 @@ commands =
4646
[testenv:loader-idyntree]
4747
deps =
4848
idyntree >= 8.0.0
49-
pytest
5049
commands =
51-
pytest --import-mode=importlib tests/loaders/test_idyntree.py
50+
python -m unittest tests/loaders/test_idyntree.py
5251

5352
[testenv:loader-mujoco]
5453
deps =
5554
mujoco >=2.2.1
56-
pytest
5755
commands =
58-
mujoco: pytest --import-mode=importlib tests/loaders/test_mujoco.py
56+
python -m unittest tests/loaders/test_mujoco.py
5957

6058
[testenv:loader-pinocchio]
6159
deps =
6260
pin >=2.6.14
63-
pytest
6461
commands =
65-
pytest --import-mode=importlib tests/loaders/test_pinocchio.py
62+
python -m unittest tests/loaders/test_pinocchio.py
6663

6764
[testenv:loader-pybullet]
6865
deps =
6966
numpy >=1.23.4
7067
pybullet >=3.2.5
71-
pytest
7268
commands =
73-
pytest --import-mode=importlib tests/loaders/test_pybullet.py
69+
python -m unittest tests/loaders/test_pybullet.py
7470

7571
[testenv:loader-robomeshcat]
7672
deps =
7773
pycollada >=0.6
78-
pytest
7974
robomeshcat >= 1.0.4
8075
commands =
81-
pytest --import-mode=importlib tests/loaders/test_robomeshcat.py
76+
python -m unittest tests/loaders/test_robomeshcat.py
8277

8378
[testenv:loader-yourdfpy]
8479
deps =
8580
numpy >=1.23.4
86-
pytest
8781
trimesh ~=3.16.0
8882
yourdfpy >=0.0.53
8983
commands =
90-
pytest --import-mode=importlib tests/loaders/test_yourdfpy.py
84+
python -m unittest tests/loaders/test_yourdfpy.py
9185

9286
[pylint]
9387
generated-members=mujoco.MjModel, pin.JointModelFreeFlyer, pin.JointModelPX, pin.JointModelPY, pin.JointModelPZ, pin.JointModelPlanar, pin.JointModelRX, pin.JointModelRY, pin.JointModelRZ, pin.JointModelSpherical, pin.JointModelSphericalZYX, pin.JointModelTranslation, pin.Model, pybullet.loadURDF, pybullet.setAdditionalSearchPath

0 commit comments

Comments
 (0)