| 110 | class PerturbationTest(absltest.TestCase): |
| 111 | |
| 112 | def setUp(self): |
| 113 | super().setUp() |
| 114 | self.model = mock.MagicMock() |
| 115 | self.data = mock.MagicMock() |
| 116 | self.scene = mock.MagicMock() |
| 117 | self.valid_pos = np.array([1, 2, 3]) |
| 118 | |
| 119 | self.body_id = 0 |
| 120 | self.data.xpos = [np.array([0, 1, 2])] |
| 121 | self.data.xmat = [np.identity(3)] |
| 122 | |
| 123 | self.perturbation = renderer.Perturbation( |
| 124 | self.body_id, self.model, self.data, self.scene) |
| 125 | |
| 126 | renderer.mujoco.reset_mock() |
| 127 | |
| 128 | def test_start_params_validation(self): |
| 129 | self.perturbation.start_move(None, self.valid_pos) |