pull/28641/head
Shane Smiskol 2 years ago
parent 393bfe2479
commit cde385af6e
  1. 4
      selfdrive/car/toyota/tests/test_toyota.py
  2. 2
      selfdrive/car/toyota/values.py

@ -3,7 +3,7 @@ from hypothesis import given, settings, strategies as st
import unittest import unittest
from cereal import car from cereal import car
from selfdrive.car.fw_versions import build_fw_dict from openpilot.selfdrive.car.fw_versions import build_fw_dict
from openpilot.selfdrive.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC_CAR, FW_VERSIONS, \ from openpilot.selfdrive.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC_CAR, FW_VERSIONS, \
FW_QUERY_CONFIG, PLATFORM_CODE_ECUS, get_platform_codes FW_QUERY_CONFIG, PLATFORM_CODE_ECUS, get_platform_codes
@ -90,7 +90,7 @@ class TestToyotaFingerprint(unittest.TestCase):
# Toyota places the ECU part number in their FW versions, assert all parsable # Toyota places the ECU part number in their FW versions, assert all parsable
# Note that there is only one unique part number per ECU across the fleet, so this # Note that there is only one unique part number per ECU across the fleet, so this
# is not important for identification, just a sanity check. # is not important for identification, just a sanity check.
self.assertTrue(all({code.count(b"-") > 1 for code in codes}), self.assertTrue(all(code.count(b"-") > 1 for code in codes),
f"FW does not have part number: {fw} {codes}") f"FW does not have part number: {fw} {codes}")
def test_platform_codes_spot_check(self): def test_platform_codes_spot_check(self):

@ -2,7 +2,7 @@ import re
from collections import defaultdict from collections import defaultdict
from dataclasses import dataclass, field from dataclasses import dataclass, field
from enum import Enum, IntFlag from enum import Enum, IntFlag
from typing import Dict, List, Set, Tuple, Union from typing import Dict, List, Set, Union
from cereal import car from cereal import car
from openpilot.common.conversions import Conversions as CV from openpilot.common.conversions import Conversions as CV

Loading…
Cancel
Save