mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-06 16:01:45 +00:00
25 lines
561 B
Python
25 lines
561 B
Python
![]() |
from functools import partial
|
||
|
|
||
|
import pytest
|
||
|
|
||
|
from gym import Space
|
||
|
from gym.spaces import utils
|
||
|
|
||
|
TESTING_SPACE = Space()
|
||
|
|
||
|
|
||
|
@pytest.mark.parametrize(
|
||
|
"func",
|
||
|
[
|
||
|
TESTING_SPACE.sample,
|
||
|
partial(TESTING_SPACE.contains, None),
|
||
|
partial(utils.flatdim, TESTING_SPACE),
|
||
|
partial(utils.flatten, TESTING_SPACE, None),
|
||
|
partial(utils.flatten_space, TESTING_SPACE),
|
||
|
partial(utils.unflatten, TESTING_SPACE, None),
|
||
|
],
|
||
|
)
|
||
|
def test_not_implemented_errors(func):
|
||
|
with pytest.raises(NotImplementedError):
|
||
|
func()
|