diff --git a/tagilmo/VereyaPython/agent_host.py b/tagilmo/VereyaPython/agent_host.py index 2486968..672b9b6 100644 --- a/tagilmo/VereyaPython/agent_host.py +++ b/tagilmo/VereyaPython/agent_host.py @@ -548,9 +548,10 @@ def onMissionControlMessage(self, xml: TimestampedString) -> Optional[None]: return assert self.current_mission_record is not None if self.current_mission_record.isRecording(): - missionEndedXML = open(self.current_mission_record.getMissionEndedPath(), 'w') - missionEndedXML.write(xml.text) - missionEndedXML.close() + if self.current_mission_record.getMissionEndedPath(): + missionEndedXML = open(self.current_mission_record.getMissionEndedPath(), 'w') + missionEndedXML.write(xml.text) + missionEndedXML.close() self.close() elif root_node_name == "ping": # The mod is pinging us to check we are still around - do nothing. diff --git a/tests/vereya/test_motion_mob.py b/tests/vereya/test_motion_mob.py index 05b8fe2..5407cf7 100644 --- a/tests/vereya/test_motion_mob.py +++ b/tests/vereya/test_motion_mob.py @@ -20,7 +20,7 @@ class TestMotionMob(TestMotion): @classmethod def setUpClass(cls, *args, **kwargs): start = (-151.0, -213.0) - mc, obs = init_mission(None, start_x=start[0], start_z=start[1], forceReset='true', seed='43') + mc, obs = init_mission(None, start_x=start[0], start_z=start[1], start_y=65, forceReset='true', seed='43') cls.mc = mc cls.obs = obs assert mc.safeStart() diff --git a/tests/vereya/test_motion_vereya.py b/tests/vereya/test_motion_vereya.py index 336688a..96498e7 100644 --- a/tests/vereya/test_motion_vereya.py +++ b/tests/vereya/test_motion_vereya.py @@ -19,7 +19,7 @@ class TestMotion(BaseTest): @classmethod def setUpClass(cls, *args, **kwargs): start = (-151.0, -213.0) - mc, obs = init_mission(None, start_x=start[0],start_z=start[1], forceReset='true', seed='43') + mc, obs = init_mission(None, start_x=start[0], start_z=start[1], start_y=66, forceReset='true', seed='43') cls.mc = mc cls.obs = obs assert mc.safeStart() @@ -75,8 +75,8 @@ def teadDown(self): super().tearDown() def setUp(self): - self.obs.stopMove() super().setUp() + self.obs.stopMove() @classmethod def tearDownClass(cls, *args, **kwargs):