From bf4f8e0ca97a83881e399378a149ddca06cf13de Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 21 Jun 2022 00:11:55 -0700 Subject: [PATCH] test_models: check cruiseState.available (#24924) * check available is true if enabled is true * remove extra line old-commit-hash: e45eb1bd28623571079122030392fa0fe03e7a42 --- selfdrive/car/tests/test_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 27dc4ba776..cb4b868582 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -221,6 +221,7 @@ class TestCarModelBase(unittest.TestCase): # TODO: check rest of panda's carstate (steering, ACC main on, etc.) checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev() + checks['cruiseState'] += CS.cruiseState.enabled and not CS.cruiseState.available # TODO: remove this exception once this mismatch is resolved brake_pressed = CS.brakePressed