-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refactor bt_list_adapters.py and add unit tests to it (BugFix) #875
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #875 +/- ##
==========================================
+ Coverage 35.70% 35.78% +0.07%
==========================================
Files 303 303
Lines 34250 34262 +12
Branches 5917 5918 +1
==========================================
+ Hits 12230 12260 +30
+ Misses 21458 21439 -19
- Partials 562 563 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
A few comments here and there, the only thing that is a no-go for me is hiding code from the coverage bot by putting it in under if __name__ == "__main__"
, please do take those lines into a main function
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.
Nice, well done ty!
…ical#875) * Refactor bt_list_adapters.py and add unit tests to it * Take Max's comments into account * Add unit tests to cover the new main function
Description
Gave a presentation about unit testing in Checkbox. As a demo, picked a script with 0% coverage and improved its coverage.
While I initially wrote tests for the script, I realized it was a good candidate for a refactor, so I modified the script and wrote unit tests for my refactor.
Tests
./manage.py test -u
pass