Skip to content

Commit

Permalink
use assertApprox from TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
fabinsch authored and jcarpent committed May 30, 2024
1 parent 04a18d9 commit 7ee9e8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions unittest/python/bindings_contact_inverse_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import numpy as np

import pinocchio as pin
from test_case import PinocchioTestCase as TestCase


@unittest.skipUnless(pin.WITH_URDFDOM, "Needs URDFDOM")
class TestContactInverseDynamics(unittest.TestCase):
class TestContactInverseDynamics(TestCase):
def setUp(self):
self.current_file = os.path.dirname(str(os.path.abspath(__file__)))
self.model_dir = os.path.abspath(
Expand Down Expand Up @@ -132,8 +133,8 @@ def test_call_to_contact_inverse_dynamics(self):
prox_settings,
lambda_guess,
)
assert np.allclose(tau1, tau2)
assert np.allclose(tau1, tau3)
self.assertApprox(tau1, tau2)
self.assertApprox(tau1, tau3)


if __name__ == "__main__":
Expand Down

0 comments on commit 7ee9e8f

Please sign in to comment.