Commit b9c43e60 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Format] run yapf for python files

parent 23c4ada3
Pipeline #8151 passed with stage
in 18 minutes and 24 seconds
......@@ -9,24 +9,22 @@ multicontact_api.switchToNumpyArray()
class GeometryTest(unittest.TestCase):
def test_geom_soc6(self):
A = np.identity(3)
c = np.array([1., 1., 1.])
def test_geom_soc6(self):
A = np.identity(3)
c = np.array([1., 1., 1.])
e = multicontact_api.Ellipsoid3d(A, c)
self.assertTrue((e.A == A).all())
self.assertTrue((e.center == c).all())
self.assertEqual(e.lhsValue(c), 0.0)
e = multicontact_api.Ellipsoid3d(A, c)
self.assertTrue((e.A==A).all())
self.assertTrue((e.center==c).all())
self.assertEqual(e.lhsValue(c),0.0)
Q = np.identity(6)
direction = np.ones(6)
Q = np.identity(6)
direction = np.ones(6)
C6D = multicontact_api.SOC6(Q, direction)
self.assertTrue((C6D.Q==Q).all())
self.assertTrue((C6D.direction==(direction/np.linalg.norm(direction))).all())
C6D = multicontact_api.SOC6(Q, direction)
self.assertTrue((C6D.Q == Q).all())
self.assertTrue((C6D.direction == (direction / np.linalg.norm(direction))).all())
if __name__ == '__main__':
unittest.main()
This diff is collapsed.
......@@ -9,7 +9,7 @@ class TrivialTest(unittest.TestCase):
comopla = multicontact_api.ContactModelPlanar()
epsilon = 0.00001
value_wanted = -1.0
self.assertTrue((comopla.mu-value_wanted)<epsilon)
self.assertTrue((comopla.mu - value_wanted) < epsilon)
if __name__ == '__main__':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment