/
githubmirror
/
gym
Обзор
Документация
Войти
/
githubmirror
/
gym
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/spaces/test_space.py
24 строки
561 B
Mark Towers
Add testing for Fundamental spaces with full coverage (#3048)
04 сен 2022, 00:56
Не верифицирован
04 сен 2022, 00:56
8e74fe3
Код
Авторство
О чём код?
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()