mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-09-30 11:23:55 +08:00
16ec56398c
* add openpilot prefix to imports
* more
* more
* fix docs
* fix linter
* bump submodules
* fix patched tests
* update dynamic imports
* debug
* Revert "debug"
This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.
* fix pm test
old-commit-hash: a9626f95b6
21 lines
550 B
Python
Executable File
21 lines
550 B
Python
Executable File
#!/usr/bin/env python3
|
|
import re
|
|
import unittest
|
|
|
|
from openpilot.selfdrive.car.honda.values import FW_VERSIONS
|
|
|
|
HONDA_FW_VERSION_RE = br"\d{5}-[A-Z0-9]{3}(-|,)[A-Z0-9]{4}(\x00){2}$"
|
|
|
|
|
|
class TestHondaFingerprint(unittest.TestCase):
|
|
def test_fw_version_format(self):
|
|
# Asserts all FW versions follow an expected format
|
|
for fw_by_ecu in FW_VERSIONS.values():
|
|
for fws in fw_by_ecu.values():
|
|
for fw in fws:
|
|
self.assertTrue(re.match(HONDA_FW_VERSION_RE, fw) is not None, fw)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|