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

Fix quirk ID test ignoring custom clusters in v2 quirks #264

Merged

Conversation

TheJulianJES
Copy link
Contributor

@TheJulianJES TheJulianJES commented Oct 26, 2024

Proposed change

The quirk ID cluster handler test currently also checks that all cluster handlers in the registry have a cluster that ZHA can find somewhere.
Previously, the ZHA test only looped through the v1 quirks registry to get all custom clusters. With this PR, we also go over adds_metadata and replaces_metadata.add to include the cluster ids of custom clusters used in v2 quirks.

all_quirk_ids was also renamed to cluster_quirk_id_map, as that name should hopefully be slightly more clear.
The renaming is done in a separate commit, so feel free to look at the individual commits for a smaller diff.

Additional information

Unblocks:

This test should likely be separated in the future (Filed: #265).

We also have places in zha-quirks that would need similar logic. Maybe we can unify this for v2 quirks somewhere, so we don't have to access adds_metadata and replaces_metadata.add directly in all those tests? (Filed: #266)

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.31%. Comparing base (c6c1888) to head (83ff450).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #264      +/-   ##
==========================================
+ Coverage   96.27%   96.31%   +0.04%     
==========================================
  Files          61       61              
  Lines        9367     9363       -4     
==========================================
  Hits         9018     9018              
+ Misses        349      345       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dmulcahey dmulcahey merged commit 593d33c into zigpy:dev Oct 26, 2024
9 checks passed
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.

2 participants