Skip to content

Commit

Permalink
chore: Add map definition to state recording test
Browse files Browse the repository at this point in the history
  • Loading branch information
ll7 committed Jun 4, 2024
1 parent 6e6597a commit 6261b81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pickle

from robot_sf.gym_env.robot_env import RobotEnv, VisualizableSimState
from robot_sf.nav.map_config import MapDefinition

def test_recording():
env = RobotEnv(
Expand All @@ -24,10 +25,13 @@ def test_recording():

# Load the recording
with open(os.path.join('recordings', filename), 'rb') as f:
recorded_states = pickle.load(f)
recorded_states, map_def = pickle.load(f)

# Check that the recording has the correct length
assert len(recorded_states) == 10

# Check that the recorded states are instances of VisualizableSimState
assert all(isinstance(state, VisualizableSimState) for state in recorded_states)

# Check that the map definition is an instance of MapDefinition
assert isinstance(map_def, MapDefinition)

0 comments on commit 6261b81

Please sign in to comment.