Add type hints to integration tests (m-p) (#87705)
This commit is contained in:
parent
6551eb168d
commit
3abf7ea18a
99 changed files with 637 additions and 438 deletions
|
@ -3,6 +3,8 @@ from datetime import timedelta
|
|||
import os
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.profiler import (
|
||||
CONF_SECONDS,
|
||||
SERVICE_DUMP_LOG_OBJECTS,
|
||||
|
@ -15,6 +17,7 @@ from homeassistant.components.profiler import (
|
|||
)
|
||||
from homeassistant.components.profiler.const import DOMAIN
|
||||
from homeassistant.const import CONF_SCAN_INTERVAL, CONF_TYPE
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||
|
@ -78,7 +81,9 @@ async def test_memory_usage(hass, tmpdir):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
async def test_object_growth_logging(hass, caplog):
|
||||
async def test_object_growth_logging(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test we can setup and the service and we can dump objects to the log."""
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN)
|
||||
|
@ -119,7 +124,9 @@ async def test_object_growth_logging(hass, caplog):
|
|||
assert "Growth" not in caplog.text
|
||||
|
||||
|
||||
async def test_dump_log_object(hass, caplog):
|
||||
async def test_dump_log_object(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test we can setup and the service is registered and logging works."""
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN)
|
||||
|
@ -154,7 +161,9 @@ async def test_dump_log_object(hass, caplog):
|
|||
caplog.clear()
|
||||
|
||||
|
||||
async def test_log_thread_frames(hass, caplog):
|
||||
async def test_log_thread_frames(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test we can log thread frames."""
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN)
|
||||
|
@ -175,7 +184,9 @@ async def test_log_thread_frames(hass, caplog):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
async def test_log_scheduled(hass, caplog):
|
||||
async def test_log_scheduled(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test we can log scheduled items in the event loop."""
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue