Merge pull request #2160 from traversaro:patch-40
PiperOrigin-RevId: 690660035 Change-Id: Id4dc7eb53b7c6cda050d1e6b385eec16d66d077e
This commit is contained in:
@@ -18,6 +18,7 @@ import inspect
|
||||
import textwrap
|
||||
|
||||
from absl.testing import absltest
|
||||
from etils import epath
|
||||
import mujoco
|
||||
import numpy as np
|
||||
|
||||
@@ -433,7 +434,8 @@ class SpecsTest(absltest.TestCase):
|
||||
)
|
||||
|
||||
def test_load_xml(self):
|
||||
filename = '../../test/testdata/model.xml'
|
||||
file_path = epath.resource_path("mujoco") / "testdata" / "model.xml"
|
||||
filename = file_path.as_posix()
|
||||
state_type = mujoco.mjtState.mjSTATE_INTEGRATION
|
||||
|
||||
# Load from file.
|
||||
@@ -694,9 +696,8 @@ class SpecsTest(absltest.TestCase):
|
||||
mujoco.mjtGeom.mjGEOM_BOX)
|
||||
|
||||
def test_delete(self):
|
||||
filename = '../../test/testdata/model.xml'
|
||||
|
||||
spec = mujoco.MjSpec.from_file(filename)
|
||||
file_path = epath.resource_path("mujoco") / "testdata" / "model.xml"
|
||||
spec = mujoco.MjSpec.from_file(file_path.as_posix())
|
||||
|
||||
model = spec.compile()
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
Reference in New Issue
Block a user