MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / testTendonSameness

Method testTendonSameness

dm_control/mjcf/element_test.py:276–298  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

274 self.assertIsNotSame(body_1, body_2)
275
276 def testTendonSameness(self):
277 mujoco = element.RootElement(model='test')
278
279 spatial_1 = mujoco.tendon.add('spatial')
280 spatial_1.add('site', site='foo')
281 spatial_1.add('geom', geom='bar')
282
283 spatial_2 = mujoco.tendon.add('spatial')
284 spatial_2.add('site', site='foo')
285 spatial_2.add('geom', geom='bar')
286
287 self.assertIsSame(spatial_1, spatial_2)
288
289 # strict ordering is required
290 spatial_3 = mujoco.tendon.add('spatial')
291 spatial_3.add('site', site='foo')
292 spatial_3.add('geom', geom='bar')
293
294 spatial_4 = mujoco.tendon.add('spatial')
295 spatial_4.add('geom', geom='bar')
296 spatial_4.add('site', site='foo')
297
298 self.assertIsNotSame(spatial_3, spatial_4)
299
300 def testCopy(self):
301 mujoco = parser.from_path(_TEST_MODEL_XML)

Callers

nothing calls this directly

Calls 3

assertIsSameMethod · 0.95
assertIsNotSameMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected