mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-07-08 14:52:03 +00:00
Add type annotations to all test functions across 8 files in `tests/iot/`, improving type safety and enabling mypy to check function bodies.
12 lines
399 B
Python
12 lines
399 B
Python
from kasa.iot import IotWallSwitch
|
|
|
|
from ..device_fixtures import wallswitch_iot
|
|
|
|
|
|
@wallswitch_iot
|
|
def test_wallswitch_motion(dev: IotWallSwitch) -> None:
|
|
"""Check that wallswitches with motion sensor get modules enabled."""
|
|
has_motion = "PIR" in dev.sys_info["dev_name"]
|
|
assert "motion" in dev.modules if has_motion else True
|
|
assert "ambient" in dev.modules if has_motion else True
|