enable a test

pull/28641/head
Shane Smiskol 2 years ago
parent e700568bfd
commit 7fb9dc430a
  1. 33
      selfdrive/car/toyota/tests/test_toyota.py

@ -44,6 +44,8 @@ class TestToyotaInterfaces(unittest.TestCase):
class TestToyotaFingerprint(unittest.TestCase): class TestToyotaFingerprint(unittest.TestCase):
# Tests for part numbers, platform codes, and sub-versions which Toyota will use to fuzzy
# fingerprint in the absence of full FW matches:
@settings(max_examples=100) @settings(max_examples=100)
@given(data=st.data()) @given(data=st.data())
def test_platform_codes_fuzzy_fw(self, data): def test_platform_codes_fuzzy_fw(self, data):
@ -64,23 +66,20 @@ class TestToyotaFingerprint(unittest.TestCase):
self.assertTrue(len(ret)) self.assertTrue(len(ret))
print('ret', ret) print('ret', ret)
# Tests for platform codes, part numbers, and FW dates which Hyundai will use to fuzzy def test_platform_code_ecus_available(self):
# fingerprint in the absence of full FW matches: # Asserts ECU keys essential for fuzzy fingerprinting are available on all platforms
# def test_platform_code_ecus_available(self): for car_model, ecus in FW_VERSIONS.items():
# # TODO: add queries for these non-CAN FD cars to get EPS with self.subTest(car_model=car_model):
# no_eps_platforms = CANFD_CAR | {CAR.KIA_SORENTO, CAR.KIA_OPTIMA_G4, CAR.KIA_OPTIMA_G4_FL, for platform_code_ecu in PLATFORM_CODE_ECUS:
# CAR.SONATA_LF, CAR.TUCSON, CAR.GENESIS_G90, CAR.GENESIS_G80} if platform_code_ecu == Ecu.eps and car_model in (CAR.PRIUS_V, CAR.LEXUS_CTH,):
# continue
# # Asserts ECU keys essential for fuzzy fingerprinting are available on all platforms if platform_code_ecu == Ecu.abs and car_model in (CAR.ALPHARD_TSS2,):
# for car_model, ecus in FW_VERSIONS.items(): continue
# with self.subTest(car_model=car_model): # TODO: add DSU FW versions for Highlander Hybrid
# for platform_code_ecu in PLATFORM_CODE_ECUS: if platform_code_ecu == Ecu.dsu and car_model in TSS2_CAR | {CAR.HIGHLANDERH}:
# if platform_code_ecu in (Ecu.fwdRadar, Ecu.eps) and car_model == CAR.HYUNDAI_GENESIS: continue
# continue self.assertIn(platform_code_ecu, [e[0] for e in ecus])
# if platform_code_ecu == Ecu.eps and car_model in no_eps_platforms:
# continue
# self.assertIn(platform_code_ecu, [e[0] for e in ecus])
#
# def test_fw_format(self): # def test_fw_format(self):
# # Asserts: # # Asserts:
# # - every supported ECU FW version returns one platform code # # - every supported ECU FW version returns one platform code

Loading…
Cancel
Save