From 152a6d9340d5600c96b362348cd1278896a59e21 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 2 Jun 2023 22:50:13 -0700 Subject: [PATCH] clean up hyundai test a bit --- selfdrive/car/hyundai/tests/test_hyundai.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/hyundai/tests/test_hyundai.py b/selfdrive/car/hyundai/tests/test_hyundai.py index c0fbde6e9b..8fedf58bd1 100755 --- a/selfdrive/car/hyundai/tests/test_hyundai.py +++ b/selfdrive/car/hyundai/tests/test_hyundai.py @@ -76,13 +76,13 @@ class TestHyundaiFingerprint(unittest.TestCase): ] all_platform_codes = defaultdict(set) - for candidate, fw_by_addr in FW_VERSIONS.items(): + for platform, fw_by_addr in FW_VERSIONS.items(): for addr, fws in fw_by_addr.items(): if addr[0] not in FW_QUERY_CONFIG.fuzzy_ecus: continue for platform_code in FW_QUERY_CONFIG.fuzzy_get_platform_codes(fws): - all_platform_codes[(addr[1], addr[2], platform_code)].add(candidate) + all_platform_codes[(addr[1], addr[2], platform_code)].add(platform) platforms_with_shared_codes = [] for platform, fw_by_addr in FW_VERSIONS.items(): @@ -91,8 +91,7 @@ class TestHyundaiFingerprint(unittest.TestCase): if addr[0] not in FW_QUERY_CONFIG.fuzzy_ecus: continue - for f in fws: - platform_code = list(FW_QUERY_CONFIG.fuzzy_get_platform_codes([f]))[0] + for platform_code in FW_QUERY_CONFIG.fuzzy_get_platform_codes(fws): shared_codes.append(len(all_platform_codes[(addr[1], addr[2], platform_code)]) > 1) # If all the platform codes for this platform are shared with another platform,