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

Method testBadQpos

dm_control/mujoco/engine_test.py:503–511  ·  view source on GitHub ↗
(self, bad_value)

Source from the content-addressed store, hash-verified

501
502 @parameterized.parameters(float('inf'), float('nan'), 1e15)
503 def testBadQpos(self, bad_value):
504 with self._physics.reset_context():
505 self._physics.data.qpos[0] = bad_value
506 with self.assertRaises(control.PhysicsError):
507 with self._physics.check_invalid_state():
508 mujoco.mj_checkPos(self._physics.model.ptr, self._physics.data.ptr)
509 self._physics.reset()
510 with self._physics.check_invalid_state():
511 mujoco.mj_checkPos(self._physics.model.ptr, self._physics.data.ptr)
512
513 def testNanControl(self):
514 with self._physics.reset_context():

Callers

nothing calls this directly

Calls 3

reset_contextMethod · 0.80
check_invalid_stateMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected