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

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Mar 22, 2022

We were calling common.InterceptorSafetyTest.setUpClass() from a Honda test, however its setUpClass checks if the class name is itself and if so, then skip the test. However, when calling from a child cls.__name__ was always the parent, so it just skipped those tests.

@@ -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

@@ -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

@sshane sshane changed the title Honda: fix missing Honda interceptor tests Honda: fix missing interceptor tests Mar 22, 2022
@@ -379,6 +379,7 @@ class TestHondaNidecInterceptorSafety(TestHondaNidecSafety, common.InterceptorSa
"""
Covers the Honda Nidec safety mode with a gas interceptor
"""
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 adeebshihadeh merged commit 0591f68 into master Mar 22, 2022
@adeebshihadeh adeebshihadeh deleted the add-missing-honda-tests-2 branch March 22, 2022 21:34
budney added a commit to budney/panda that referenced this pull request Mar 27, 2022
e01c645 Toyota: increase torque rate limit (commaai#887)
0591f68 Honda: fix missing interceptor tests (commaai#886)
991638a Tesla: only allow cancel button (commaai#880)
budney pushed a commit to budney/panda that referenced this pull request Mar 28, 2022
From: budney
2650024 Renamed unsafe_mode to alternative_experience in subaru-community code.

From: commaai/master
Merge: 0e79ab3^..7104818

7104818 rename unsafeMode to alternativeExperience (commaai#878)
e01c645 Toyota: increase torque rate limit (commaai#887)
0591f68 Honda: fix missing interceptor tests (commaai#886)
991638a Tesla: only allow cancel button (commaai#880)
499906f Nissan + Tesla: don't exit controls allowed on blocked message (commaai#877)
ba10911 GM: enters controls on falling edge of button presses (commaai#876)
868fd53 Hyundai: enter controls on falling edge of buttons (commaai#875)
4acaebb Honda: enter controls on falling edge of button presses (commaai#874)
e6722c7 Honda Nidec: match openpilot engagement behavior (commaai#872)
a53528a Add more hints when troubleshooting panda (commaai#864)
5a7af82 Hyundai: only allow cancel while cruise is enabled (commaai#870)
891653f Docker: bump openpilot and fix Toyota EPS scale factor for test (commaai#869)
234e436 rename to enable_deepsleep
860e5a4 Red Panda: auto switching to CAN FD with BRS (commaai#868)
4f422ed C2: fix bootkick (commaai#854)
de7e1e7 Deep sleep(stop) mode for pandas (commaai#832)
e8e9d84 fix release script
51ccb9f HITL tests: change testing speeds (commaai#862)
8435bda CAN FD: adjust bit timing settings to SAE specifications J2284-4 and J2284-5 (commaai#861)
cb88a17 Honda: revert back to button enable for Nidec (commaai#858)
2806eec python: add safety param arg to set_safety_mode
9d27011 misc CAN FD fixes (commaai#856)
0e79ab3 Fix USB enumeration detection for C2 (commaai#853)
budney pushed a commit to budney/panda that referenced this pull request Jun 8, 2022
* setUpClass never did anything

* oh, comments work as pass?

* pass

* Update tests/safety/test_honda.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants