Clean-up tests, latent code issues, and typos#1677
Open
ZeliardM wants to merge 6 commits intopython-kasa:masterfrom
Open
Clean-up tests, latent code issues, and typos#1677ZeliardM wants to merge 6 commits intopython-kasa:masterfrom
ZeliardM wants to merge 6 commits intopython-kasa:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1677 +/- ##
==========================================
+ Coverage 93.22% 93.25% +0.03%
==========================================
Files 157 157
Lines 9815 9815
Branches 1003 1003
==========================================
+ Hits 9150 9153 +3
+ Misses 472 470 -2
+ Partials 193 192 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@rytilahti This PR cleans up a lot of CI testing warnings and errors, the only thing left now is the handling of the fixture files and incomplete fixture file data warning, which I figured was still useful. Let me know if you have any questions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR focuses on test cleanup, a few small correctness fixes, and documentation/example updates.
It modernizes the iotbulb.py docstring examples to use the light module API instead of deprecated light shortcut properties, aligns the doctest fixture setup with the updated examples, and tightens deprecation coverage in tests/test_device.py so the deprecated light attributes are still tested intentionally without creating noisy failures. It also narrows the discover raw test to patch the CLI-level redact path, fixes a typo in the changelog, updates the setup action to actions/cache@v5, and adds support for the smart child subtype plug.powerstrip.sub-bulb.
A larger part of the change is explicit resource cleanup across the test suite. Discovery, device config, HTTP client, KLAP, AES, and SSL-AES tests now close sessions, protocols, devices, and transports reliably, including automatic cleanup in the AES and SSL-AES transport tests. This removes the unclosed aiohttp client session warnings from full pytest runs. After these changes the full pytest passes locally; the only remaining warnings are the known fixture completeness warnings.