mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-31 18:12:53 +00:00
Remove pytest class in test pixel observation wrapper (#2902)
This commit is contained in:
@@ -48,9 +48,8 @@ class FakeDictObservationEnvironment(FakeEnvironment):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class TestPixelObservationWrapper(gym.Wrapper):
|
|
||||||
@pytest.mark.parametrize("pixels_only", (True, False))
|
@pytest.mark.parametrize("pixels_only", (True, False))
|
||||||
def test_dict_observation(self, pixels_only):
|
def test_dict_observation(pixels_only):
|
||||||
pixel_key = "rgb"
|
pixel_key = "rgb"
|
||||||
|
|
||||||
env = FakeDictObservationEnvironment()
|
env = FakeDictObservationEnvironment()
|
||||||
@@ -89,8 +88,9 @@ class TestPixelObservationWrapper(gym.Wrapper):
|
|||||||
assert rgb_observation.shape == (height, width, 3)
|
assert rgb_observation.shape == (height, width, 3)
|
||||||
assert rgb_observation.dtype == np.uint8
|
assert rgb_observation.dtype == np.uint8
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("pixels_only", (True, False))
|
@pytest.mark.parametrize("pixels_only", (True, False))
|
||||||
def test_single_array_observation(self, pixels_only):
|
def test_single_array_observation(pixels_only):
|
||||||
pixel_key = "depth"
|
pixel_key = "depth"
|
||||||
|
|
||||||
env = FakeArrayObservationEnvironment()
|
env = FakeArrayObservationEnvironment()
|
||||||
|
Reference in New Issue
Block a user