From fae11a780d08e12aa1136d175575d6187dde2bc9 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 31 Oct 2022 21:32:17 -0700 Subject: [PATCH] test_models: speed up test (#26304) * Update test_models.py * Update test_models.py old-commit-hash: 23d5e5e07fb2c35e00b77a2f5ae5fad84bc71934 --- selfdrive/car/tests/test_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index a9999a4371..b665fbe9c7 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -9,7 +9,7 @@ from parameterized import parameterized_class from cereal import log, car from common.realtime import DT_CTRL -from selfdrive.boardd.boardd import can_capnp_to_can_list, can_list_to_can_capnp +from selfdrive.boardd.boardd import can_capnp_to_can_list from selfdrive.car.fingerprints import all_known_cars from selfdrive.car.car_helpers import interfaces from selfdrive.car.gm.values import CAR as GM @@ -214,10 +214,10 @@ class TestCarModelBase(unittest.TestCase): # warm up pass, as initial states may be different for can in self.can_msgs[:300]: + self.CI.update(CC, (can.as_builder().to_bytes(), )) for msg in can_capnp_to_can_list(can.can, src_filter=range(64)): to_send = package_can_msg(msg) self.safety.safety_rx_hook(to_send) - self.CI.update(CC, (can_list_to_can_capnp([msg, ]), )) if not self.CP.pcmCruise: self.safety.set_controls_allowed(0)