mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-07-31 22:04:31 +00:00
23 lines
614 B
Python
23 lines
614 B
Python
from functools import partial
|
|
|
|
import pytest
|
|
|
|
from gymnasium.spaces import utils
|
|
from tests.spaces.utils import TESTING_CUSTOM_SPACE
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"func",
|
|
[
|
|
TESTING_CUSTOM_SPACE.sample,
|
|
partial(TESTING_CUSTOM_SPACE.contains, None),
|
|
partial(utils.flatdim, TESTING_CUSTOM_SPACE),
|
|
partial(utils.flatten, TESTING_CUSTOM_SPACE, None),
|
|
partial(utils.flatten_space, TESTING_CUSTOM_SPACE),
|
|
partial(utils.unflatten, TESTING_CUSTOM_SPACE, None),
|
|
],
|
|
)
|
|
def test_not_implemented_errors(func):
|
|
with pytest.raises(NotImplementedError):
|
|
func()
|