Do not expose plugin_slot.
PiperOrigin-RevId: 683215401 Change-Id: Ic64f7221ed83ca3b0c8cca16eb680ea67c67b564
This commit is contained in:
committed by
Copybara-Service
parent
66faba9aa5
commit
1f9dca8bc4
@@ -461,11 +461,6 @@ def generate_add() -> None:
|
||||
} catch (const py::cast_error &e) {
|
||||
throw pybind11::value_error("plugin.instance_name should be a string.");
|
||||
}
|
||||
try {
|
||||
plugin.plugin_slot = input->plugin_slot;
|
||||
} catch (const py::cast_error &e) {
|
||||
throw pybind11::value_error("plugin.plugin_slot should be an int.");
|
||||
}
|
||||
try {
|
||||
plugin.active = input->active;
|
||||
} catch (const py::cast_error &e) {
|
||||
|
||||
@@ -207,13 +207,11 @@ class SpecsTest(absltest.TestCase):
|
||||
plugin = spec.add_plugin(
|
||||
name='instance_name',
|
||||
plugin_name='mujoco.plugin',
|
||||
plugin_slot=7,
|
||||
active=True,
|
||||
info='info',
|
||||
)
|
||||
self.assertEqual(plugin.name, 'instance_name')
|
||||
self.assertEqual(plugin.plugin_name, 'mujoco.plugin')
|
||||
self.assertEqual(plugin.plugin_slot, 7)
|
||||
self.assertEqual(plugin.active, True)
|
||||
self.assertEqual(plugin.info, 'info')
|
||||
|
||||
@@ -229,7 +227,6 @@ class SpecsTest(absltest.TestCase):
|
||||
body_with_plugin = spec.worldbody.add_body(plugin=plugin)
|
||||
self.assertEqual(body_with_plugin.plugin.name, 'instance_name')
|
||||
self.assertEqual(body_with_plugin.plugin.plugin_name, 'mujoco.plugin')
|
||||
self.assertEqual(body_with_plugin.plugin.plugin_slot, 7)
|
||||
self.assertEqual(body_with_plugin.plugin.active, True)
|
||||
self.assertEqual(body_with_plugin.plugin.info, 'info')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user