Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdeepsb committed Jun 13, 2024
1 parent df686d8 commit 9a10d52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_render.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
from unittest import TestCase

import evogym.envs
import gym
import gymnasium as gym
from evogym import sample_robot


class RenderTest(TestCase):
def test_it(self):
body, connections = sample_robot((5, 5))
env = gym.make("Walker-v0", body=body)
env = gym.make("Walker-v0", body=body, render_mode="human")
env.reset()

for _ in range(100):
action = env.action_space.sample() - 1
ob, reward, terminated, truncated, info = env.step(action)
env.render()

if terminated or truncated:
env.reset()
Expand Down

0 comments on commit 9a10d52

Please sign in to comment.