Skip to content

Add EP25 smart fixture and improve test framework for SMART devices #572

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 1 commit into from
Dec 8, 2023

Conversation

sdb9696
Copy link
Collaborator

@sdb9696 sdb9696 commented Dec 6, 2023

This PR adds further updates to the test framework to handle the new TAPO/SMART devices and includes the EP25 smart fixture:

  • Complete the job @rytilahti started of neatly splitting out conftest.py BULBS_IOT vs BULBS_SMART for the other device types.
  • Add protocol_filter to all the parameterize test method calls and made the default behaviour no filter so it's clearer what each filter is doing.
  • Updated the filter_model function so that it does an exact match on model name instead of fuzzy match (so KP125 doesn't return the KP125M fixture for example).
  • Added a section the README listing EP25 and KP125M with SMART. protocol as having limited support like TAPO.
  • Added a section the README stating that the API for TAPO/SMART is currently in flux and could change in future releases.
  • Add EP25 smart fixture.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b27a31a) 79.56% compared to head (6ad7de4) 79.56%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #572   +/-   ##
=======================================
  Coverage   79.56%   79.56%           
=======================================
  Files          37       37           
  Lines        3083     3083           
  Branches      804      804           
=======================================
  Hits         2453     2453           
  Misses        548      548           
  Partials       82       82           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more, the merrier! Could you add the model to the README file, too?

@sdb9696 sdb9696 force-pushed the add_ep25smart_fixture branch from c43c55f to c5b81b1 Compare December 8, 2023 11:06
@sdb9696
Copy link
Collaborator Author

sdb9696 commented Dec 8, 2023

So I've added the model to the README but while doing so I noticed that #567 had tripped up over the partially implemented splitting out of DEVICES_IOT vs DEVICES_SMART in conf_test.py (KP125M added to both PLUGS and PLUGS_SMART). This wasn't breaking tests because of the equally confusing default protocol_filter={"IOT"} in filter_model.

So to get ahead of any future confusion I've updated the PR to:

  • Complete the job @rytilahti started of neatly splitting out conftest.py BULBS_IOT vs BULBS_SMART for the other device types.
  • Add protocol_filter to all the parameterize test method calls and made the default behaviour no filter so it's clearer what each filter is doing.
  • Updated the filter_model function so that it does an exact match on model name instead of fuzzy match (so KP125 doesn't return the KP125M fixture for example).
  • Added a section the README listing EP25 and KP125M with SMART. protocol as having limited support like TAPO.
  • Added a section the README stating that the API for TAPO/SMART is currently in flux and could change in future releases.

@sdb9696 sdb9696 changed the title Add EP25 smart fixture Add EP25 smart fixture and further update test framework for SMART devices Dec 8, 2023
@sdb9696 sdb9696 force-pushed the add_ep25smart_fixture branch from c5b81b1 to a46b862 Compare December 8, 2023 11:40
Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rytilahti rytilahti force-pushed the add_ep25smart_fixture branch from a46b862 to 6ad7de4 Compare December 8, 2023 13:49
@rytilahti rytilahti changed the title Add EP25 smart fixture and further update test framework for SMART devices Add EP25 smart fixture and improve test framework for SMART devices Dec 8, 2023
@rytilahti rytilahti merged commit 16ba873 into python-kasa:master Dec 8, 2023
@sdb9696 sdb9696 deleted the add_ep25smart_fixture branch December 8, 2023 17:04
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