8000 Cleanup discovery & add tests by rytilahti · Pull Request #212 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Cleanup discovery & add tests #212

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

Merged
merged 4 commits into from
Sep 24, 2021

Conversation

rytilahti
Copy link
Member
  • discovered_devices_raw is not anymore available, as that can be accessed directly from the device objects
  • test most of the discovery code paths
  • some minor cleanups to test handling
  • update discovery docs

* discovered_devices_raw is not anymore available, as that can be accessed directly from the device objects
* test most of the discovery code paths
* some minor cleanups to test handling
* update discovery docs
@codecov-commenter
Copy link
codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #212 (7d2aebc) into master (bdb07a7) will increase coverage by 3.55%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   76.98%   80.53%   +3.55%     
==========================================
  Files          12       12              
  Lines        1286     1269      -17     
  Branches      175      170       -5     
==========================================
+ Hits          990     1022      +32     
+ Misses        267      219      -48     
+ Partials       29       28       -1     
Impacted Files Coverage Δ
kasa/cli.py 57.79% <0.00%> (ø)
kasa/discover.py 77.89% <77.77%> (+37.71%) ⬆️
kasa/smartdevice.py 85.67% <0.00%> (+0.59%) ⬆️
kasa/smartstrip.py 93.00% <0.00%> (+0.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdb07a7...7d2aebc. Read the comment docs.

@rytilahti rytilahti merged commit acb221b into python-kasa:master Sep 24, 2021
@rytilahti rytilahti deleted the refactor/cleanup_discovery branch September 24, 2021 15:18
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Sep 24, 2021
This release introduces re-using the device connection to get rid of (sometimes slow) connection establishment.
This is especially useful for emeter-enabled smart strips or any other usecases requiring consecutive I/O requests.

[Full Changelog](python-kasa/python-kasa@0.4.0.dev4...0.4.0.dev5)

**Merged pull requests:**

- Add KL130 fixture, initial lightstrip tests [\python-kasa#214](python-kasa#214) ([rytilahti](https://github.com/rytilahti))
- Keep connection open and lock to prevent duplicate requests [\python-kasa#213](python-kasa#213) ([bdraco](https://github.com/bdraco))
- Cleanup discovery & add tests [\python-kasa#212](python-kasa#212) ([rytilahti](https://github.com/rytilahti))
@rytilahti rytilahti mentioned this pull request Sep 24, 2021
rytilahti added a commit that referenced this pull request Sep 24, 2021
This release introduces re-using the device connection to get rid of (sometimes slow) connection establishment.
This is especially useful for emeter-enabled smart strips or any other usecases requiring consecutive I/O requests.

[Full Changelog](0.4.0.dev4...0.4.0.dev5)

**Merged pull requests:**

- Add KL130 fixture, initial lightstrip tests [\#214](#214) ([rytilahti](https://github.com/rytilahti))
- Keep connection open and lock to prevent duplicate requests [\#213](#213) ([bdraco](https://github.com/bdraco))
- Cleanup discovery & add tests [\#212](#212) ([rytilahti](https://github.com/rytilahti))
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Oct 11, 2021
* Cleanup discovery & add tests

* discovered_devices_raw is not anymore available, as that can be accessed directly from the device objects
* test most of the discovery code paths
* some minor cleanups to test handling
* update discovery docs

* Move category check to be after the definitions

* skip a couple of tests requiring asyncmock not available on py37

* Remove return_raw usage from cli.discover
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Oct 11, 2021
This release introduces re-using the device connection to get rid of (sometimes slow) connection establishment.
This is especially useful for emeter-enabled smart strips or any other usecases requiring consecutive I/O requests.

[Full Changelog](python-kasa/python-kasa@0.4.0.dev4...0.4.0.dev5)

**Merged pull requests:**

- Add KL130 fixture, initial lightstrip tests [\python-kasa#214](python-kasa#214) ([rytilahti](https://github.com/rytilahti))
- Keep connection open and lock to prevent duplicate requests [\python-kasa#213](python-kasa#213) ([bdraco](https://github.com/bdraco))
- Cleanup discovery & add tests [\python-kasa#212](python-kasa#212) ([rytilahti](https://github.com/rytilahti))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0