with self.assertRaisesRegexp(control.PhysicsError, warning_name):
self._physics.check_invalid_state()
self._physics.reset()
self._physics.check_invalid_state()
@parameterized.parameters(float("inf"), float("nan"), 1e15)
def testBadQpos(self, bad_value):
with self._physics.reset_context():
After Change
with self._physics.check_invalid_state():
self._physics.data.warning[warning_enum].number = 1
// Existing warnings should not raise an exception.
with self._physics.check_invalid_state():
pass
self._physics.reset()
with self._physics.check_invalid_state():
pass