@@ -41,7 +41,7 @@ def test_kwargs_constructor(self):
4141
4242 def test_GetAttr (self ):
4343 root = Sofa .Core .Node ("rootNode" )
44- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
44+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" , name = "Sofa.Component.StateContainer" )
4545 c = root .addChild ("child1" )
4646 self .assertTrue (c is not None )
4747 self .assertTrue (root .child1 is not None )
@@ -52,7 +52,7 @@ def test_GetAttr(self):
5252
5353 def test_init (self ):
5454 root = Sofa .Core .Node ("rootNode" )
55- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
55+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
5656 c = root .addChild ("child1" )
5757 c = c .addObject ("MechanicalObject" , name = "MO" , position = [0.0 ,1.0 ,2.0 ]* 100 )
5858 root .init ()
@@ -94,7 +94,7 @@ def test_removeChild(self):
9494
9595 def test_createObjectWithParam (self ):
9696 root = Sofa .Core .Node ("rootNode" )
97- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
97+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
9898 root .addObject ("MechanicalObject" , name = "mechanical" , position = [[0 ,0 ,0 ],[1 ,1 ,1 ],[2 ,2 ,2 ]])
9999
100100 def test_children_property (self ):
@@ -124,7 +124,7 @@ def test_parents_property(self):
124124
125125 def test_objects_property (self ):
126126 root = Sofa .Core .Node ("rootNode" )
127- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
127+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
128128 child = root .addChild (Sofa .Core .Node ("child1" ))
129129 child .addObject ("MechanicalObject" , name = "name1" )
130130 child .addObject ("MechanicalObject" , name = "name2" )
@@ -134,7 +134,7 @@ def test_objects_property(self):
134134
135135 def test_objects_property_contains_method (self ):
136136 root = Sofa .Core .Node ("rootNode" )
137- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
137+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
138138 child = root .addChild (Sofa .Core .Node ("child1" ))
139139 child .addObject ("MechanicalObject" , name = "name1" )
140140 child .addObject ("MechanicalObject" , name = "name2" )
@@ -146,7 +146,7 @@ def test_objects_property_contains_method(self):
146146
147147 def test_objects_property_remove_at_method (self ):
148148 root = Sofa .Core .Node ("rootNode" )
149- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
149+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
150150 child = root .addChild (Sofa .Core .Node ("child1" ))
151151 child .addObject ("MechanicalObject" , name = "name1" )
152152 child .addObject ("MechanicalObject" , name = "name2" )
@@ -166,7 +166,7 @@ def test_data_property(self):
166166
167167 def test_getItem (self ):
168168 root = Sofa .Core .Node ("root" )
169- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
169+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
170170 node1 = root .addChild ('node1' )
171171 object1 = root .addObject ("MechanicalObject" , name = "object1" )
172172 node2 = node1 .addChild ('node2' )
@@ -208,20 +208,20 @@ def test_getLink(self):
208208
209209 def test_hasObjectWithFastPath (self ):
210210 root = Sofa .Core .Node ("root" )
211- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
211+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" , name = "Sofa.Component.StateContainer" )
212212 self .assertTrue (root .hasObject ("Sofa.Component.StateContainer" ))
213213 self .assertFalse (root .hasObject ("NonExistingObjectName" ))
214214
215215 def test_hasObjectWithDefaultPythonFunction (self ):
216216 root = Sofa .Core .Node ("root" )
217- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
217+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" , name = "Sofa.Component.StateContainer" )
218218
219219 self .assertTrue (hasattr (root , "Sofa.Component.StateContainer" ))
220220 self .assertFalse (hasattr (root , "NonExistingObjectName" ))
221221
222222 def test_removeObject (self ):
223223 root = Sofa .Core .Node ("root" )
224- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
224+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
225225 child = root .addChild (Sofa .Core .Node ("child1" ))
226226
227227 obj1 = child .addObject ("MechanicalObject" , name = "obj1" )
@@ -271,29 +271,29 @@ def test_detachFromGraph(self):
271271
272272 def test_getMass (self ):
273273 root = Sofa .Core .Node ("root" )
274- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
274+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
275275 root .addObject ("MechanicalObject" )
276276 m = root .addObject ("UniformMass" , name = "mass" , vertexMass = 0.1 )
277277 self .assertEqual (m ,root .getMass ())
278278
279279 def test_getForceField (self ):
280280 root = Sofa .Core .Node ("root" )
281- root .addObject ("RequiredPlugin" , name = "Sofa.Component.MechanicalLoad" )
282- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
281+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.MechanicalLoad" )
282+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
283283 root .addObject ("MechanicalObject" )
284284 ff = root .addObject ('ConstantForceField' , template = "Vec3d" , name = "cff2" )
285285 self .assertEqual (ff , root .getForceField (0 ))
286286
287287 def test_getMechanicalState (self ):
288288 root = Sofa .Core .Node ("root" )
289- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
289+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
290290 c = root .addObject ("MechanicalObject" )
291291 self .assertEqual (c , root .getMechanicalState ())
292292
293293 def test_getMechanicalMapping (self ):
294294 root = Sofa .Core .Node ("root" )
295- root .addObject ("RequiredPlugin" , name = "Sofa.Component.StateContainer" )
296- root .addObject ("RequiredPlugin" , name = "Sofa.Component.Mapping.Linear" )
295+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.StateContainer" )
296+ root .addObject ("RequiredPlugin" , pluginName = "Sofa.Component.Mapping.Linear" )
297297 root .addObject ("MechanicalObject" , name = "t1" )
298298 root .addObject ("MechanicalObject" , name = "t2" )
299299 mm = root .addObject ("BarycentricMapping" , input = "@/t1" , output = "@/t2" )
0 commit comments