Commit Graph

5 Commits

Author SHA1 Message Date
Teemu R.
6a86ffbbba
Add flake8-pytest-style (PT) for ruff (#1105)
This will catch common issues with pytest code.

* Use `match` when using `pytest.raises()` for base exception types like
`TypeError` or `ValueError`
* Use tuples for `parametrize()`
* Enforces `pytest.raises()` to contain simple statements, using `noqa`
to skip this on some cases for now.
* Fixes incorrect exception type (valueerror instead of typeerror) for
iotdimmer.
* Adds check valid types for `iotbulb.set_hsv` and `color` smart module.
* Consolidate exception messages for common interface modules.
2024-08-30 17:30:07 +02:00
Steven B
33d839866e
Make Light and Fan a common module interface (#911) 2024-05-13 17:34:44 +01:00
Adrian Dörr
0ab7436eef
Add support for KH100 hub (#847)
Add SMART.KASAHUB to the map of supported devices.
This also adds fixture files for KH100, KE100, and T310, and adapts affected modules and their tests accordingly.

---------

Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2024-04-22 16:24:15 +02:00
Teemu R
48ac39e6d8
Refactor split smartdevice tests to test_{iot,smart}device (#822) 2024-03-15 15:55:48 +00:00
Teemu R
3495bd83df
Add T315 fixture, tests for humidity&temperature modules (#802) 2024-03-06 18:04:09 +00:00