src/seals/testing/envs.py
def _sample_and_check(env: gym.Env, obs_space: gym.Space) -> bool:
    """Sample from env and check return value is of valid type."""
    act = env.action_space.sample()
    obs, rew, done, info = env.step(act)
    _check_obs(obs, obs_space)
    assert isinstance(rew, float)
    assert isinstance(done, bool)
    assert isinstance(info, dict)
    return done
Sample from env and check return value is of valid type.
Sample from env and check return value is of valid type.
Sample from env and check return value is of valid type .
def _sample_and_check(env: gym.Env, obs_space: gym.Space) -> bool:
    act = env.action_space.sample()
    obs, rew, done, info = env.step(act)
    _check_obs(obs, obs_space)
    assert isinstance(rew, float)
    assert isinstance(done, bool)
    assert isinstance(info, dict)
    return done
def _sample_and_check ( env : gym . Env , obs_space : gym . Space ) -> bool : act = env . action_space . sample ( ) obs , rew , done , info = env . step ( act ) _check_obs ( obs , obs_space ) assert isinstance ( rew , float ) assert isinstance ( done , bool ) assert isinstance ( info , dict ) return done
Sample from env and check return value is of valid type.
Sample from env and check return value is of valid type .
"""Sample from env and check return value is of valid type."""
env
gym.Env
obs_space
gym.Space