Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

Add Pytest #208

Closed rodrigodelazcano closed 2 years ago

rodrigodelazcano commented 2 years ago

Description

This PR adds the following:

  1. From old run_tests.py and test_interactive_mode.py: test_envs.py:test_agent_sees_method(), test_envs.py:old_run_test(), test_envs.py:test_interactive_mode(), test_wrappers.py:test_dict_observation_space_wrapper(), test_wrappers.py:test_main_wrappers(), test_wrappers.py:test_observation_space_wrappers(), test_wrappers.py:test_agent_sees_method()

  2. From Gym: test_envs.py:test_env(), test_envs.py:test_env_determinism_rollout(), test_envs.py:test_render_modes()

  3. New tests: test_wrappers.py:test_reseed_wrapper(), test_wrappers.py:test_state_bonus_wrapper(), test_wrappers.py:test_action_bonus_wrapper()

Type of change

Please delete options that are not relevant.

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist:

rodrigodelazcano commented 2 years ago

I updated the PR with the changes. Also fixed the deprecated None in pytest.warn()

pseudo-rnd-thoughts commented 2 years ago

LGTM