582c3c56ffc3b60f0b371c77aec170a6b7aa7210,tests/garage/envs/test_stack_frames_env.py,TestStackFrames,setUp,#TestStackFrames#,14
Before Change
class TestStackFrames(unittest.TestCase):
@overrides
def setUp(self):
self.shape = (50, 50)
self.env = mock.Mock()
self.env.observation_space = Box(
low=0, high=255, shape=self.shape, dtype=np.uint8)
self.env.reset.return_value = np.zeros(self.shape)
self.env.step.side_effect = self._step
self._n_frames = 4
self.env_s = StackFrames(self.env, n_frames=self._n_frames)
self.obs = self.env.reset()
self.obs_s = self.env_s.reset()
self.frame_width = self.env.observation_space.shape[0]
self.frame_height = self.env.observation_space.shape[1]
def _step(self, action):
After Change
def setUp(self):
self.n_frames = 4
self.env = TfEnv(DummyDiscrete2DEnv(random=False))
self.env_s = TfEnv(
StackFrames(
DummyDiscrete2DEnv(random=False), n_frames=self.n_frames))
self.width, self.height = self.env.observation_space.shape
def test_stack_frames_invalid_environment_type(self):
with self.assertRaises(ValueError):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 36
Instances
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_stack_frames_env.py
Class Name: TestStackFrames
Method Name: setUp
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_stack_frames_env.py
Class Name: TestStackFrames
Method Name: setUp
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_grayscale_env.py
Class Name: TestGrayscale
Method Name: setUp
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_repeat_action_env.py
Class Name: TestRepeatAction
Method Name: setUp