From 4355934ff001412d20d71b1f0c7343c3f3369eb6 Mon Sep 17 00:00:00 2001 From: Maxime Desroches Date: Wed, 2 Oct 2024 17:18:39 -0700 Subject: [PATCH] more lines --- tests/safety/test_subaru.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/safety/test_subaru.py b/tests/safety/test_subaru.py index b1a4b19e8..ac42bf9df 100755 --- a/tests/safety/test_subaru.py +++ b/tests/safety/test_subaru.py @@ -113,9 +113,14 @@ class TestSubaruSafetyBase(common.PandaCarSafetyTest): self.assertTrue(self._rx(self._angle_meas_msg(1))) self.assertEqual(self.safety.get_angle_meas(0), 100) - def test_vehicle_moving(self): - msg = self._speed_msg(0) - self.assertTrue(self._rx(msg)) + def test_vehicle_speed(self): + self.assertTrue(self._rx(self._speed_msg(0))) + self.assertFalse(self.safety.get_vehicle_moving()) + self.assertEqual(self.safety.get_vehicle_speed_last(), 0) + + self.assertTrue(self._rx(self._speed_msg(1))) + self.assertTrue(self.safety.get_vehicle_moving()) + self.assertEqual(self.safety.get_vehicle_speed_last(), 103) class TestSubaruStockLongitudinalSafetyBase(TestSubaruSafetyBase): def _cancel_msg(self, cancel, cruise_throttle=0):