Add LogCaptureFixture type hints in tests (#118372)
This commit is contained in:
parent
aeee222df4
commit
166c588cac
19 changed files with 98 additions and 47 deletions
|
@ -839,7 +839,9 @@ async def test_configure_reporting(hass: HomeAssistant, endpoint) -> None:
|
|||
]
|
||||
|
||||
|
||||
async def test_invalid_cluster_handler(hass: HomeAssistant, caplog) -> None:
|
||||
async def test_invalid_cluster_handler(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test setting up a cluster handler that fails to match properly."""
|
||||
|
||||
class TestZigbeeClusterHandler(cluster_handlers.ClusterHandler):
|
||||
|
@ -881,7 +883,9 @@ async def test_invalid_cluster_handler(hass: HomeAssistant, caplog) -> None:
|
|||
assert "missing_attr" in caplog.text
|
||||
|
||||
|
||||
async def test_standard_cluster_handler(hass: HomeAssistant, caplog) -> None:
|
||||
async def test_standard_cluster_handler(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test setting up a cluster handler that matches a standard cluster."""
|
||||
|
||||
class TestZigbeeClusterHandler(ColorClusterHandler):
|
||||
|
@ -916,7 +920,9 @@ async def test_standard_cluster_handler(hass: HomeAssistant, caplog) -> None:
|
|||
)
|
||||
|
||||
|
||||
async def test_quirk_id_cluster_handler(hass: HomeAssistant, caplog) -> None:
|
||||
async def test_quirk_id_cluster_handler(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test setting up a cluster handler that matches a standard cluster."""
|
||||
|
||||
class TestZigbeeClusterHandler(ColorClusterHandler):
|
||||
|
|
|
@ -233,7 +233,7 @@ async def test_zha_retry_unique_ids(
|
|||
config_entry: MockConfigEntry,
|
||||
zigpy_device_mock,
|
||||
mock_zigpy_connect: ControllerApplication,
|
||||
caplog,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
) -> None:
|
||||
"""Test that ZHA retrying creates unique entity IDs."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue