Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honda: fix missing interceptor tests #886

Merged
merged 4 commits into from Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions tests/safety/common.py
Expand Up @@ -60,9 +60,6 @@ def setUpClass(cls):
cls.safety = None
raise unittest.SkipTest

# make sure interceptor is detected
cls._rx(cls._interceptor_msg(0, 0x201)) # pylint: disable=no-value-for-parameter
Copy link
Contributor Author

@sshane sshane Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never ran with the Toyota tests, and all interceptor tests call this at the start anyway


@abc.abstractmethod
def _interceptor_msg(self, gas, addr):
pass
Expand Down
5 changes: 1 addition & 4 deletions tests/safety/test_honda.py
Expand Up @@ -379,9 +379,7 @@ class TestHondaNidecInterceptorSafety(TestHondaNidecSafety, common.InterceptorSa
"""
Covers the Honda Nidec safety mode with a gas interceptor
"""
def setUp(self):
TestHondaNidecSafety.setUpClass()
common.InterceptorSafetyTest.setUpClass()
Copy link
Contributor Author

@sshane sshane Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and below caused these tests to skip

pass
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails static analysis...

adeebshihadeh marked this conversation as resolved.
Show resolved Hide resolved


class TestHondaNidecAltSafety(TestHondaNidecSafety):
Expand Down Expand Up @@ -414,7 +412,6 @@ def setUp(self):
self.safety = libpandasafety_py.libpandasafety
self.safety.set_safety_hooks(Panda.SAFETY_HONDA_NIDEC, Panda.FLAG_HONDA_NIDEC_ALT)
self.safety.init_tests_honda()
common.InterceptorSafetyTest.setUpClass()

def _acc_state_msg(self, main_on):
values = {"MAIN_ON": main_on, "COUNTER": self.cnt_acc_state % 4}
Expand Down