zigpy / bellows

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

Use `spec` and `spec_set` in more mocks #556

Closed puddly closed 1 year ago

puddly commented 1 year ago

Unit tests did not catch that EZSP startup failed due to an improperly used context manager (sync vs async) because of too much mocking. In the future, central mocks should be replaced by patched objects.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (36c3445) 99.76% compared to head (94496bf) 99.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #556 +/- ## ======================================= Coverage 99.76% 99.76% ======================================= Files 62 62 Lines 4594 4594 ======================================= Hits 4583 4583 Misses 11 11 ``` | [Impacted Files](https://app.codecov.io/gh/zigpy/bellows/pull/556?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/zigbee/application.py](https://app.codecov.io/gh/zigpy/bellows/pull/556?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy96aWdiZWUvYXBwbGljYXRpb24ucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.