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

Method testNamesIds

dm_control/mujoco/wrapper/core_test.py:208–212  ·  view source on GitHub ↗
(self, name, object_type, object_id)

Source from the content-addressed store, hash-verified

206 ("left_knee", mujoco.mjtObj.mjOBJ_JOINT, 11),
207 )
208 def testNamesIds(self, name, object_type, object_id):
209 output_id = self.model.name2id(name, object_type)
210 self.assertEqual(object_id, output_id)
211 output_name = self.model.id2name(object_id, object_type)
212 self.assertEqual(name, output_name)
213
214 def testNamesIdsExceptions(self):
215 with self.assertRaisesRegex(core.Error, "does not exist"):

Callers

nothing calls this directly

Calls 3

name2idMethod · 0.80
assertEqualMethod · 0.80
id2nameMethod · 0.80

Tested by

no test coverage detected