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

Method test_id

dm_control/mjcf/physics_test.py:72–80  ·  view source on GitHub ↗
(self, namespace, single_element)

Source from the content-addressed store, hash-verified

70 ('actuator', True),
71 ('actuator', False))
72 def test_id(self, namespace, single_element):
73 elements, full_identifiers = self.sample_elements(namespace, single_element)
74 actual = self.physics.bind(elements).element_id
75 if single_element:
76 expected = self.physics.model.name2id(full_identifiers, namespace)
77 else:
78 expected = [self.physics.model.name2id(name, namespace)
79 for name in full_identifiers]
80 np.testing.assert_array_equal(expected, actual)
81
82 def assertCanGetAndSetBindingArray(
83 self, binding, attribute_name, named_indexer, full_identifiers):

Callers

nothing calls this directly

Calls 3

sample_elementsMethod · 0.95
name2idMethod · 0.80
bindMethod · 0.45

Tested by

no test coverage detected