mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Params: add new method to get all keys (#25779)
* allKeys * cleanup and test Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: 85b433760a2c1a139062a40040e096b9de880e33
This commit is contained in:
@@ -98,6 +98,14 @@ class TestParams(unittest.TestCase):
|
||||
assert q.get("CarParams") is None
|
||||
assert q.get("CarParams", True) == b"1"
|
||||
|
||||
def test_params_all_keys(self):
|
||||
keys = Params().all_keys()
|
||||
|
||||
# sanity checks
|
||||
assert len(keys) > 20
|
||||
assert len(keys) == len(set(keys))
|
||||
assert b"CarParams" in keys
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user