582c3c56ffc3b60f0b371c77aec170a6b7aa7210,tests/garage/envs/test_grayscale_env.py,TestGrayscale,setUp,#TestGrayscale#,14

Before Change


class TestGrayscale(unittest.TestCase):
    @overrides
    def setUp(self):
        self.shape = (50, 50, 3)
        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.env_g = Grayscale(self.env)

        self.obs = self.env.reset()
        self.obs_g = self.env_g.reset()

    def _step(self, action):
        return np.full(self.shape, 125), 0, False, dict()

After Change


    @overrides
    def setUp(self):
        self.env = TfEnv(DummyDiscretePixelEnv(random=False))
        self.env_g = TfEnv(Grayscale(DummyDiscretePixelEnv(random=False)))

    def test_gray_scale_invalid_environment_type(self):
        with self.assertRaises(ValueError):
            self.env.observation_space = Discrete(64)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 35

Instances


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_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_resize_env.py
Class Name: TestResize
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