more lines

This commit is contained in:
Maxime Desroches 2024-10-02 17:18:39 -07:00
parent 4a54616da1
commit 4355934ff0
1 changed files with 8 additions and 3 deletions

View File

@ -113,9 +113,14 @@ class TestSubaruSafetyBase(common.PandaCarSafetyTest):
self.assertTrue(self._rx(self._angle_meas_msg(1))) self.assertTrue(self._rx(self._angle_meas_msg(1)))
self.assertEqual(self.safety.get_angle_meas(0), 100) self.assertEqual(self.safety.get_angle_meas(0), 100)
def test_vehicle_moving(self): def test_vehicle_speed(self):
msg = self._speed_msg(0) self.assertTrue(self._rx(self._speed_msg(0)))
self.assertTrue(self._rx(msg)) 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): class TestSubaruStockLongitudinalSafetyBase(TestSubaruSafetyBase):
def _cancel_msg(self, cancel, cruise_throttle=0): def _cancel_msg(self, cancel, cruise_throttle=0):