Add mujoco.MjSpec.MjStruct type.
PiperOrigin-RevId: 723552214 Change-Id: I8ecb43b4025b532ba8b48e15c9c6a2b350293d20
This commit is contained in:
committed by
Copybara-Service
parent
fe16c27555
commit
dec7b661c1
@@ -17,6 +17,7 @@
|
||||
import inspect
|
||||
import os
|
||||
import textwrap
|
||||
import typing
|
||||
import zipfile
|
||||
|
||||
from absl.testing import absltest
|
||||
@@ -32,6 +33,12 @@ def get_linenumber():
|
||||
|
||||
class SpecsTest(absltest.TestCase):
|
||||
|
||||
def test_typing(self):
|
||||
spec = mujoco.MjSpec()
|
||||
self.assertIsInstance(spec, mujoco.MjSpec)
|
||||
self.assertIsInstance(spec.worldbody, mujoco.MjsBody)
|
||||
self.assertIsInstance(spec.worldbody, typing.get_args(mujoco.MjStruct))
|
||||
|
||||
def test_basic(self):
|
||||
# Create a spec.
|
||||
spec = mujoco.MjSpec()
|
||||
|
||||
Reference in New Issue
Block a user