python icon indicating copy to clipboard operation
python copied to clipboard

A small offering of unit test coverage

Open nerdenator opened this issue 1 year ago • 4 comments

Increasing unit test line coverage a bit for some of the BLE classes; very very minor code cleanup where I remove a line of code that simply will not be reached.

nerdenator avatar Jun 14 '24 05:06 nerdenator

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 59.38%. Comparing base (d996965) to head (2f812cd).

Files Patch % Lines
meshtastic/ble_interface.py 16.66% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
+ Coverage   58.99%   59.38%   +0.38%     
==========================================
  Files          23       23              
  Lines        3419     3422       +3     
==========================================
+ Hits         2017     2032      +15     
+ Misses       1402     1390      -12     
Flag Coverage Δ
unittests 59.38% <16.66%> (+0.38%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

codecov[bot] avatar Jun 18 '24 04:06 codecov[bot]

It looks like at present this doesn't add any non-commented-out tests -- I'm guessing you're still working on it? If not, let me know.

ianmcorvidae avatar Jun 26 '24 01:06 ianmcorvidae

@ianmcorvidae Yes, I apologize, been working with other stuff. Basically, I think I need more isolation around the Bluetooth library; it still seems to be calling code that looks for a Bluetooth device on whatever machine is running the unit tests. This won't fail on my machine (which has Bluetooth) but will fail on GitHub Actions' host node, which if I'm guessing, probably doesn't have Bluetooth.

nerdenator avatar Jun 26 '24 01:06 nerdenator

@ianmcorvidae I think I'm at a stopping point here; there's some details around the Bluetooth connection code that I need to understand better and maybe dig deeper on. I'll try to make draft PRs in the future.

nerdenator avatar Jun 26 '24 05:06 nerdenator