Skip to content
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 split smartdevice tests to test_{iot,smart}device #822

Merged
merged 1 commit into from Mar 15, 2024

Conversation

rytilahti
Copy link
Member

This does not add any new tests, but just reorganizes the existing ones.

  • Common tests for the device api are stored in test_device.py
  • Common tests for smart devices in test_smartdevice.py
  • Common tests for iot devices in test_iotdevice.py

@rytilahti rytilahti requested a review from sdb9696 March 15, 2024 14:37
@rytilahti
Copy link
Member Author

Wanted to clean this up a bit before adding some tests for #807.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not completely happy about the naming of this file, as it doesn't really test the Device API at the moment, but rather some other common functionalities.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.21%. Comparing base (063518b) to head (a5f1d82).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #822   +/-   ##
=======================================
  Coverage   89.21%   89.21%           
=======================================
  Files          63       63           
  Lines        4543     4543           
  Branches     1151     1151           
=======================================
  Hits         4053     4053           
  Misses        407      407           
  Partials       83       83           

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

Copy link
Collaborator

@sdb9696 sdb9696 left a comment

Choose a reason for hiding this comment

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

lgtm other than the question whether test_xxxdevice.py should go in the subfolders.

@@ -0,0 +1,259 @@
"""Module for common iotdevice tests."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this go under an iot folder similar to the smart subfolder?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohh, good catch, probably yes 😄

@@ -1,319 +1,18 @@
import importlib
Copy link
Collaborator

@sdb9696 sdb9696 Mar 15, 2024

Choose a reason for hiding this comment

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

Shouldn't this go under the smart subfolder?

EDIT: actually will merge this as it might help with history this way. Can always be moved after.

@sdb9696 sdb9696 merged commit 48ac39e into master Mar 15, 2024
29 checks passed
@sdb9696 sdb9696 deleted the janitor/cleanup_smartdevice_tests branch March 15, 2024 15:55
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.

None yet

2 participants