-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Add more HomeKit device enumeration tests #22194
Add more HomeKit device enumeration tests #22194
Conversation
497bfeb
to
cd235ff
Compare
(Rebased to get fix from #22207) |
Sorry to bump but if someone could look at this it would be great, and would unblock me to work on some more homekit_controller PR's from my configentry branch. It doesn't change any HA code, just add homekit_controller tests in the same style as a PR that already landed (#22141). |
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
@@ -0,0 +1,488 @@ | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want the fixtures under tests/fixtures
.
profile_path = os.path.join( | ||
os.path.dirname(__file__), 'aqara_gateway.json' | ||
) | ||
accessories = setup_accessories_from_file(profile_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does I/O and should be put on the executor. We shouldn't interfere with the event loop even if it's a test, I think.
await hass.async_add_executor_job(...)
Both requested changes have now been made. I didn't push a rebase because of the breakage on |
Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
Not really sure what is going on here. This change only contains tests, so shouldn't be pulling coverage down., especially on files i haven't gone near! Best guess is that because its an old PR (11 days old) the coverage has gone up on dev in the mean time, so coveralls thinks it will reduce the coverage? When obviously it won't. I would rebase to fix it but it looks like there are CI failures on dev still. So i'm not sure what the next steps are for this PR? |
Merged. |
Ahh brilliant, tyvm! |
* Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated * Move json to fixtures directory * Move IO to executor
Description:
Another test only branch for homekit_controller - hopefully the last before the remaining config entry work.
These are all the remaining tests from my homekit_controller config entry branch tests that can be merged ahead of the remaining config entry code. Like #22141 these are tests that ensure devices we know should more or less work now continue to more or less work - espsecially that
supported_features
continue to be detected correctly and that all the supported accessories on multi-device hubs are detected.Checklist:
tox
. Your PR cannot be merged unless tests pass