zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
182 stars 86 forks source link

Ensure version-specific unit tests cover command sending format #639

Closed puddly closed 2 months ago

puddly commented 2 months ago

In the future, we need to migrate bellows to a more robust framework that tests end-to-end command serialization and response parsing. Until then, I've replaced all blind mocks with those that also try to serialize the command.

There was a single error with EZSPv8 that has since been corrected.

Fixes https://github.com/zigpy/bellows/issues/640

puddly commented 2 months ago

I've migrated test_application.py as well.

A future PR will add end-to-end testing of the entire command serialization format and adapter response for every EZSP version, hopefully like we do in zigpy-znp.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.10%. Comparing base (61f7ec0) to head (55370ed).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #639 +/- ## ========================================== - Coverage 99.16% 99.10% -0.06% ========================================== Files 50 50 Lines 3460 3462 +2 ========================================== Hits 3431 3431 - Misses 29 31 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.