From 6261b81ada8edf32d19c076263c3b32cb309ad54 Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 4 Jun 2024 10:15:05 +0000 Subject: [PATCH] chore: Add map definition to state recording test --- tests/test_recording.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_recording.py b/tests/test_recording.py index 7186a69..4eae248 100644 --- a/tests/test_recording.py +++ b/tests/test_recording.py @@ -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( @@ -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)