Import Generator from collections.abc (2) (#120915)

This commit is contained in:
Marc Mueller 2024-07-01 11:58:49 +02:00 committed by GitHub
parent f11b316dac
commit 2f0dd6f704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
125 changed files with 128 additions and 139 deletions

View File

@ -1,11 +1,11 @@
"""Configuration for Abode tests.""" """Configuration for Abode tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from jaraco.abode.helpers import urls as URL from jaraco.abode.helpers import urls as URL
import pytest import pytest
from requests_mock import Mocker from requests_mock import Mocker
from typing_extensions import Generator
from tests.common import load_fixture from tests.common import load_fixture
from tests.components.light.conftest import mock_light_profiles # noqa: F401 from tests.components.light.conftest import mock_light_profiles # noqa: F401

View File

@ -1,9 +1,9 @@
"""Common fixtures for the AccuWeather tests.""" """Common fixtures for the AccuWeather tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.accuweather.const import DOMAIN from homeassistant.components.accuweather.const import DOMAIN

View File

@ -1,9 +1,9 @@
"""Test fixtures for aemet.""" """Test fixtures for aemet."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Common fixtures for the AfterShip tests.""" """Common fixtures for the AfterShip tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Test fixtures for Agent DVR.""" """Test fixtures for Agent DVR."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,10 +1,10 @@
"""AirGradient tests configuration.""" """AirGradient tests configuration."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
from airgradient import Config, Measures from airgradient import Config, Measures
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.airgradient.const import DOMAIN from homeassistant.components.airgradient.const import DOMAIN
from homeassistant.const import CONF_HOST from homeassistant.const import CONF_HOST

View File

@ -1,10 +1,10 @@
"""Define fixtures for AirNow tests.""" """Define fixtures for AirNow tests."""
from collections.abc import Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.airnow import DOMAIN from homeassistant.components.airnow import DOMAIN
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS

View File

@ -1,9 +1,9 @@
"""Test fixtures for air-Q.""" """Test fixtures for air-Q."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Common fixtures for the Airtouch 5 tests.""" """Common fixtures for the Airtouch 5 tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,10 +1,10 @@
"""Define test fixtures for AirVisual.""" """Define test fixtures for AirVisual."""
from collections.abc import AsyncGenerator, Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.airvisual import ( from homeassistant.components.airvisual import (
CONF_CITY, CONF_CITY,

View File

@ -1,10 +1,10 @@
"""Define test fixtures for AirVisual Pro.""" """Define test fixtures for AirVisual Pro."""
from collections.abc import AsyncGenerator, Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.airvisual_pro.const import DOMAIN from homeassistant.components.airvisual_pro.const import DOMAIN
from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD

View File

@ -1,9 +1,9 @@
"""Test fixtures for the Aladdin Connect Garage Door integration.""" """Test fixtures for the Aladdin Connect Garage Door integration."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
from tests.common import MockConfigEntry from tests.common import MockConfigEntry

View File

@ -1,9 +1,9 @@
"""Fixturs for Alarm Control Panel tests.""" """Fixturs for Alarm Control Panel tests."""
from collections.abc import Generator
from unittest.mock import MagicMock from unittest.mock import MagicMock
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.alarm_control_panel import ( from homeassistant.components.alarm_control_panel import (
DOMAIN as ALARM_CONTROL_PANEL_DOMAIN, DOMAIN as ALARM_CONTROL_PANEL_DOMAIN,

View File

@ -1,9 +1,9 @@
"""Provide common Amber fixtures.""" """Provide common Amber fixtures."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,11 +1,11 @@
"""Common fixtures for the Ambient Weather Network integration tests.""" """Common fixtures for the Ambient Weather Network integration tests."""
from collections.abc import Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
from aioambient import OpenAPI from aioambient import OpenAPI
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import ambient_network from homeassistant.components import ambient_network
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,10 +1,10 @@
"""Define test fixtures for Ambient PWS.""" """Define test fixtures for Ambient PWS."""
from collections.abc import Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.ambient_station.const import CONF_APP_KEY, DOMAIN from homeassistant.components.ambient_station.const import CONF_APP_KEY, DOMAIN
from homeassistant.const import CONF_API_KEY from homeassistant.const import CONF_API_KEY

View File

@ -1,11 +1,11 @@
"""Common fixtures for the Homeassistant Analytics tests.""" """Common fixtures for the Homeassistant Analytics tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from python_homeassistant_analytics import CurrentAnalytics from python_homeassistant_analytics import CurrentAnalytics
from python_homeassistant_analytics.models import CustomIntegration, Integration from python_homeassistant_analytics.models import CustomIntegration, Integration
from typing_extensions import Generator
from homeassistant.components.analytics_insights.const import ( from homeassistant.components.analytics_insights.const import (
CONF_TRACKED_CUSTOM_INTEGRATIONS, CONF_TRACKED_CUSTOM_INTEGRATIONS,

View File

@ -1,9 +1,9 @@
"""Fixtures for the Android TV integration tests.""" """Fixtures for the Android TV integration tests."""
from collections.abc import Generator
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
import pytest import pytest
from typing_extensions import Generator
from . import patchers from . import patchers

View File

@ -1,10 +1,9 @@
"""Fixtures for the Android TV Remote integration tests.""" """Fixtures for the Android TV Remote integration tests."""
from collections.abc import Callable from collections.abc import Callable, Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.androidtv_remote.const import DOMAIN from homeassistant.components.androidtv_remote.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState from homeassistant.config_entries import ConfigEntryState

View File

@ -1,5 +1,6 @@
"""Common fixtures for the A. O. Smith tests.""" """Common fixtures for the A. O. Smith tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from py_aosmith import AOSmithAPIClient from py_aosmith import AOSmithAPIClient
@ -14,7 +15,6 @@ from py_aosmith.models import (
SupportedOperationModeInfo, SupportedOperationModeInfo,
) )
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.aosmith.const import DOMAIN from homeassistant.components.aosmith.const import DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.const import CONF_EMAIL, CONF_PASSWORD

View File

@ -1,10 +1,10 @@
"""Tests for the sensor platform of the A. O. Smith integration.""" """Tests for the sensor platform of the A. O. Smith integration."""
from collections.abc import AsyncGenerator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from typing_extensions import AsyncGenerator
from homeassistant.const import Platform from homeassistant.const import Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,11 +1,11 @@
"""Tests for the water heater platform of the A. O. Smith integration.""" """Tests for the water heater platform of the A. O. Smith integration."""
from collections.abc import AsyncGenerator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
from py_aosmith.models import OperationMode from py_aosmith.models import OperationMode
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from typing_extensions import AsyncGenerator
from homeassistant.components.water_heater import ( from homeassistant.components.water_heater import (
ATTR_AWAY_MODE, ATTR_AWAY_MODE,

View File

@ -1,12 +1,12 @@
"""Fixtures for component.""" """Fixtures for component."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from pyatv import conf from pyatv import conf
from pyatv.const import PairingRequirement, Protocol from pyatv.const import PairingRequirement, Protocol
from pyatv.support import http from pyatv.support import http
import pytest import pytest
from typing_extensions import Generator
from .common import MockPairingHandler, airplay_service, create_conf, mrp_service from .common import MockPairingHandler, airplay_service, create_conf, mrp_service

View File

@ -1,12 +1,12 @@
"""Test config flow.""" """Test config flow."""
from collections.abc import Generator
from ipaddress import IPv4Address, ip_address from ipaddress import IPv4Address, ip_address
from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch
from pyatv import exceptions from pyatv import exceptions
from pyatv.const import PairingRequirement, Protocol from pyatv.const import PairingRequirement, Protocol
import pytest import pytest
from typing_extensions import Generator
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components import zeroconf from homeassistant.components import zeroconf

View File

@ -2,13 +2,12 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable, Generator
import logging import logging
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant import config_entries, data_entry_flow from homeassistant import config_entries, data_entry_flow
from homeassistant.components.application_credentials import ( from homeassistant.components.application_credentials import (

View File

@ -1,11 +1,11 @@
"""Test APRS device tracker.""" """Test APRS device tracker."""
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch from unittest.mock import MagicMock, Mock, patch
import aprslib import aprslib
from aprslib import IS from aprslib import IS
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.aprs import device_tracker from homeassistant.components.aprs import device_tracker
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,10 +1,10 @@
"""Common fixtures for the APsystems Local API tests.""" """Common fixtures for the APsystems Local API tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from APsystemsEZ1 import ReturnDeviceInfo, ReturnOutputData from APsystemsEZ1 import ReturnDeviceInfo, ReturnOutputData
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.apsystems.const import DOMAIN from homeassistant.components.apsystems.const import DOMAIN
from homeassistant.const import CONF_IP_ADDRESS from homeassistant.const import CONF_IP_ADDRESS

View File

@ -1,11 +1,11 @@
"""Tests for the arcam_fmj component.""" """Tests for the arcam_fmj component."""
from collections.abc import AsyncGenerator
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
from arcam.fmj.client import Client from arcam.fmj.client import Client
from arcam.fmj.state import State from arcam.fmj.state import State
import pytest import pytest
from typing_extensions import AsyncGenerator
from homeassistant.components.arcam_fmj.const import DEFAULT_NAME from homeassistant.components.arcam_fmj.const import DEFAULT_NAME
from homeassistant.components.arcam_fmj.media_player import ArcamFmj from homeassistant.components.arcam_fmj.media_player import ArcamFmj

View File

@ -1,11 +1,11 @@
"""Tests for the Arcam FMJ config flow module.""" """Tests for the Arcam FMJ config flow module."""
from collections.abc import Generator
from dataclasses import replace from dataclasses import replace
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from arcam.fmj.client import ConnectionFailed from arcam.fmj.client import ConnectionFailed
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import ssdp from homeassistant.components import ssdp
from homeassistant.components.arcam_fmj.config_flow import get_entry_client from homeassistant.components.arcam_fmj.config_flow import get_entry_client

View File

@ -1,10 +1,10 @@
"""Common fixtures for the Arve tests.""" """Common fixtures for the Arve tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from asyncarve import ArveCustomer, ArveDevices, ArveSensPro, ArveSensProData from asyncarve import ArveCustomer, ArveDevices, ArveSensPro, ArveSensProData
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.arve.const import DOMAIN from homeassistant.components.arve.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -2,13 +2,12 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import AsyncIterable from collections.abc import AsyncIterable, Generator
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
from unittest.mock import AsyncMock from unittest.mock import AsyncMock
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import stt, tts, wake_word from homeassistant.components import stt, tts, wake_word
from homeassistant.components.assist_pipeline import DOMAIN, select as assist_select from homeassistant.components.assist_pipeline import DOMAIN, select as assist_select

View File

@ -1,10 +1,10 @@
"""Websocket tests for Voice Assistant integration.""" """Websocket tests for Voice Assistant integration."""
from collections.abc import AsyncGenerator
from typing import Any from typing import Any
from unittest.mock import ANY, patch from unittest.mock import ANY, patch
import pytest import pytest
from typing_extensions import AsyncGenerator
from homeassistant.components import conversation from homeassistant.components import conversation
from homeassistant.components.assist_pipeline.const import DOMAIN from homeassistant.components.assist_pipeline.const import DOMAIN

View File

@ -1,9 +1,9 @@
"""Test mailbox.""" """Test mailbox."""
from collections.abc import Generator
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.asterisk_mbox import DOMAIN from homeassistant.components.asterisk_mbox import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,10 +1,10 @@
"""Provide common Atag fixtures.""" """Provide common Atag fixtures."""
import asyncio import asyncio
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Common fixtures for the Aurora tests.""" """Common fixtures for the Aurora tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.aurora.const import CONF_THRESHOLD, DOMAIN from homeassistant.components.aurora.const import CONF_THRESHOLD, DOMAIN
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable, Generator
from copy import deepcopy from copy import deepcopy
from types import MappingProxyType from types import MappingProxyType
from typing import Any from typing import Any
@ -11,7 +11,6 @@ from unittest.mock import AsyncMock, patch
from axis.rtsp import Signal, State from axis.rtsp import Signal, State
import pytest import pytest
import respx import respx
from typing_extensions import Generator
from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry

View File

@ -1,6 +1,6 @@
"""Test Axis device.""" """Test Axis device."""
from collections.abc import Callable from collections.abc import Callable, Generator
from ipaddress import ip_address from ipaddress import ip_address
from types import MappingProxyType from types import MappingProxyType
from typing import Any from typing import Any
@ -9,7 +9,6 @@ from unittest.mock import ANY, AsyncMock, Mock, call, patch
import axis as axislib import axis as axislib
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import axis, zeroconf from homeassistant.components import axis, zeroconf
from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN

View File

@ -1,12 +1,12 @@
"""Test fixtures for Azure Data Explorer.""" """Test fixtures for Azure Data Explorer."""
from collections.abc import Generator
from datetime import timedelta from datetime import timedelta
import logging import logging
from typing import Any from typing import Any
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.azure_data_explorer.const import ( from homeassistant.components.azure_data_explorer.const import (
CONF_FILTER, CONF_FILTER,

View File

@ -1,5 +1,6 @@
"""Test fixtures for AEH.""" """Test fixtures for AEH."""
from collections.abc import AsyncGenerator, Generator
from dataclasses import dataclass from dataclasses import dataclass
from datetime import timedelta from datetime import timedelta
import logging import logging
@ -8,7 +9,6 @@ from unittest.mock import AsyncMock, MagicMock, patch
from azure.eventhub.aio import EventHubProducerClient from azure.eventhub.aio import EventHubProducerClient
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.azure_event_hub.const import ( from homeassistant.components.azure_event_hub.const import (
CONF_FILTER, CONF_FILTER,

View File

@ -2,12 +2,11 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable, Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from pybalboa.enums import HeatMode, LowHighRange from pybalboa.enums import HeatMode, LowHighRange
import pytest import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,9 +1,9 @@
"""The tests for the Binary sensor component.""" """The tests for the Binary sensor component."""
from collections.abc import Generator
from unittest import mock from unittest import mock
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import binary_sensor from homeassistant.components import binary_sensor
from homeassistant.config_entries import ConfigEntry, ConfigFlow from homeassistant.config_entries import ConfigEntry, ConfigFlow

View File

@ -1,9 +1,8 @@
"""Blueprints test helpers.""" """Blueprints test helpers."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
from typing_extensions import Generator
def stub_blueprint_populate_fixture_helper() -> Generator[None]: def stub_blueprint_populate_fixture_helper() -> Generator[None]:
"""Stub copying the blueprints to the config folder.""" """Stub copying the blueprints to the config folder."""

View File

@ -1,12 +1,12 @@
"""Tests for the bluetooth component.""" """Tests for the bluetooth component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
from bleak_retry_connector import bleak_manager from bleak_retry_connector import bleak_manager
from dbus_fast.aio import message_bus from dbus_fast.aio import message_bus
import habluetooth.util as habluetooth_utils import habluetooth.util as habluetooth_utils
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture(name="disable_bluez_manager_socket", autouse=True, scope="package") @pytest.fixture(name="disable_bluez_manager_socket", autouse=True, scope="package")

View File

@ -1,5 +1,6 @@
"""Tests for the Bluetooth integration manager.""" """Tests for the Bluetooth integration manager."""
from collections.abc import Generator
from datetime import timedelta from datetime import timedelta
import time import time
from typing import Any from typing import Any
@ -11,7 +12,6 @@ from bluetooth_adapters import AdvertisementHistory
# pylint: disable-next=no-name-in-module # pylint: disable-next=no-name-in-module
from habluetooth.advertisement_tracker import TRACKER_BUFFERING_WOBBLE_SECONDS from habluetooth.advertisement_tracker import TRACKER_BUFFERING_WOBBLE_SECONDS
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import bluetooth from homeassistant.components import bluetooth
from homeassistant.components.bluetooth import ( from homeassistant.components.bluetooth import (

View File

@ -1,11 +1,12 @@
"""Fixtures for BMW tests.""" """Fixtures for BMW tests."""
from collections.abc import Generator
from bimmer_connected.tests import ALL_CHARGING_SETTINGS, ALL_PROFILES, ALL_STATES from bimmer_connected.tests import ALL_CHARGING_SETTINGS, ALL_PROFILES, ALL_STATES
from bimmer_connected.tests.common import MyBMWMockRouter from bimmer_connected.tests.common import MyBMWMockRouter
from bimmer_connected.vehicle import remote_services from bimmer_connected.vehicle import remote_services
import pytest import pytest
import respx import respx
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Test fixtures for Bravia TV.""" """Test fixtures for Bravia TV."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,11 +1,11 @@
"""Common fixtures for the Bring! tests.""" """Common fixtures for the Bring! tests."""
from collections.abc import Generator
from typing import cast from typing import cast
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from bring_api.types import BringAuthResponse from bring_api.types import BringAuthResponse
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.bring import DOMAIN from homeassistant.components.bring import DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.const import CONF_EMAIL, CONF_PASSWORD

View File

@ -1,11 +1,11 @@
"""Test fixtures for brother.""" """Test fixtures for brother."""
from collections.abc import Generator
from datetime import UTC, datetime from datetime import UTC, datetime
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from brother import BrotherSensors from brother import BrotherSensors
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.brother.const import DOMAIN from homeassistant.components.brother.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_TYPE from homeassistant.const import CONF_HOST, CONF_TYPE

View File

@ -1,9 +1,9 @@
"""Test fixtures for Brottplatskartan.""" """Test fixtures for Brottplatskartan."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Configuration for brunt tests.""" """Configuration for brunt tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,10 +1,10 @@
"""Fixtures for BSBLAN integration tests.""" """Fixtures for BSBLAN integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from bsblan import Device, Info, State from bsblan import Device, Info, State
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.bsblan.const import CONF_PASSKEY, DOMAIN from homeassistant.components.bsblan.const import CONF_PASSKEY, DOMAIN
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME

View File

@ -1,9 +1,9 @@
"""Test fixtures for buienradar2.""" """Test fixtures for buienradar2."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,11 +1,11 @@
"""The tests for the Button component.""" """The tests for the Button component."""
from collections.abc import Generator
from datetime import timedelta from datetime import timedelta
from unittest.mock import MagicMock from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory from freezegun.api import FrozenDateTimeFactory
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.button import ( from homeassistant.components.button import (
DOMAIN, DOMAIN,

View File

@ -1,11 +1,11 @@
"""Test the CalDAV config flow.""" """Test the CalDAV config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
from caldav.lib.error import AuthorizationError, DAVError from caldav.lib.error import AuthorizationError, DAVError
import pytest import pytest
import requests import requests
from typing_extensions import Generator
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.caldav.const import DOMAIN from homeassistant.components.caldav.const import DOMAIN

View File

@ -1,12 +1,12 @@
"""Test fixtures for calendar sensor platforms.""" """Test fixtures for calendar sensor platforms."""
from collections.abc import Generator
import datetime import datetime
import secrets import secrets
from typing import Any from typing import Any
from unittest.mock import AsyncMock from unittest.mock import AsyncMock
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.calendar import DOMAIN, CalendarEntity, CalendarEvent from homeassistant.components.calendar import DOMAIN, CalendarEntity, CalendarEvent
from homeassistant.config_entries import ConfigEntry, ConfigFlow from homeassistant.config_entries import ConfigEntry, ConfigFlow

View File

@ -2,6 +2,7 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Generator
from datetime import timedelta from datetime import timedelta
from http import HTTPStatus from http import HTTPStatus
from typing import Any from typing import Any
@ -9,7 +10,6 @@ from typing import Any
from freezegun import freeze_time from freezegun import freeze_time
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
import voluptuous as vol import voluptuous as vol
from homeassistant.components.calendar import DOMAIN, SERVICE_GET_EVENTS from homeassistant.components.calendar import DOMAIN, SERVICE_GET_EVENTS

View File

@ -9,7 +9,7 @@ forward exercising the triggers.
from __future__ import annotations from __future__ import annotations
from collections.abc import AsyncIterator, Callable from collections.abc import AsyncIterator, Callable, Generator
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
import datetime import datetime
import logging import logging
@ -19,7 +19,6 @@ import zoneinfo
from freezegun.api import FrozenDateTimeFactory from freezegun.api import FrozenDateTimeFactory
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import automation, calendar from homeassistant.components import automation, calendar
from homeassistant.components.calendar.trigger import EVENT_END, EVENT_START from homeassistant.components.calendar.trigger import EVENT_END, EVENT_START

View File

@ -1,9 +1,9 @@
"""Test helpers for camera.""" """Test helpers for camera."""
from collections.abc import AsyncGenerator, Generator
from unittest.mock import PropertyMock, patch from unittest.mock import PropertyMock, patch
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components import camera from homeassistant.components import camera
from homeassistant.components.camera.const import StreamType from homeassistant.components.camera.const import StreamType

View File

@ -1,12 +1,12 @@
"""The tests for the camera component.""" """The tests for the camera component."""
from collections.abc import Generator
from http import HTTPStatus from http import HTTPStatus
import io import io
from types import ModuleType from types import ModuleType
from unittest.mock import AsyncMock, Mock, PropertyMock, mock_open, patch from unittest.mock import AsyncMock, Mock, PropertyMock, mock_open, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import camera from homeassistant.components import camera
from homeassistant.components.camera.const import ( from homeassistant.components.camera.const import (

View File

@ -1,10 +1,10 @@
"""Define fixtures available for all tests.""" """Define fixtures available for all tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
from canary.api import Api from canary.api import Api
import pytest import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,10 +1,10 @@
"""Common fixtures for the Midea ccm15 AC Controller tests.""" """Common fixtures for the Midea ccm15 AC Controller tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from ccm15 import CCM15DeviceState, CCM15SlaveDevice from ccm15 import CCM15DeviceState, CCM15SlaveDevice
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Configuration for cert_expiry tests.""" """Configuration for cert_expiry tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,7 +1,8 @@
"""Fixtures for Climate platform tests.""" """Fixtures for Climate platform tests."""
from collections.abc import Generator
import pytest import pytest
from typing_extensions import Generator
from homeassistant.config_entries import ConfigFlow from homeassistant.config_entries import ConfigFlow
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,7 +1,8 @@
"""Test climate intents.""" """Test climate intents."""
from collections.abc import Generator
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import conversation from homeassistant.components import conversation
from homeassistant.components.climate import ( from homeassistant.components.climate import (

View File

@ -1,6 +1,6 @@
"""Fixtures for cloud tests.""" """Fixtures for cloud tests."""
from collections.abc import Callable, Coroutine from collections.abc import AsyncGenerator, Callable, Coroutine, Generator
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
from unittest.mock import DEFAULT, MagicMock, PropertyMock, patch from unittest.mock import DEFAULT, MagicMock, PropertyMock, patch
@ -15,7 +15,6 @@ from hass_nabucasa.remote import RemoteUI
from hass_nabucasa.voice import Voice from hass_nabucasa.voice import Voice
import jwt import jwt
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.cloud.client import CloudClient from homeassistant.components.cloud.client import CloudClient
from homeassistant.components.cloud.const import DATA_CLOUD from homeassistant.components.cloud.const import DATA_CLOUD

View File

@ -1,12 +1,12 @@
"""Test account link services.""" """Test account link services."""
import asyncio import asyncio
from collections.abc import Generator
import logging import logging
from time import time from time import time
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.cloud import account_link from homeassistant.components.cloud import account_link

View File

@ -1,10 +1,10 @@
"""Tests for the cloud binary sensor.""" """Tests for the cloud binary sensor."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
from hass_nabucasa.const import DISPATCH_REMOTE_CONNECT, DISPATCH_REMOTE_DISCONNECT from hass_nabucasa.const import DISPATCH_REMOTE_CONNECT, DISPATCH_REMOTE_DISCONNECT
import pytest import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_registry import EntityRegistry from homeassistant.helpers.entity_registry import EntityRegistry

View File

@ -1,5 +1,6 @@
"""Test the speech-to-text platform for the cloud integration.""" """Test the speech-to-text platform for the cloud integration."""
from collections.abc import AsyncGenerator
from copy import deepcopy from copy import deepcopy
from http import HTTPStatus from http import HTTPStatus
from typing import Any from typing import Any
@ -7,7 +8,6 @@ from unittest.mock import AsyncMock, MagicMock, patch
from hass_nabucasa.voice import STTResponse, VoiceError from hass_nabucasa.voice import STTResponse, VoiceError
import pytest import pytest
from typing_extensions import AsyncGenerator
from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY
from homeassistant.components.cloud.const import DOMAIN from homeassistant.components.cloud.const import DOMAIN

View File

@ -1,6 +1,6 @@
"""Tests for cloud tts.""" """Tests for cloud tts."""
from collections.abc import Callable, Coroutine from collections.abc import AsyncGenerator, Callable, Coroutine
from copy import deepcopy from copy import deepcopy
from http import HTTPStatus from http import HTTPStatus
from typing import Any from typing import Any
@ -8,7 +8,6 @@ from unittest.mock import AsyncMock, MagicMock, patch
from hass_nabucasa.voice import TTS_VOICES, VoiceError, VoiceTokenError from hass_nabucasa.voice import TTS_VOICES, VoiceError, VoiceTokenError
import pytest import pytest
from typing_extensions import AsyncGenerator
import voluptuous as vol import voluptuous as vol
from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY

View File

@ -1,9 +1,9 @@
"""Define fixtures available for all tests.""" """Define fixtures available for all tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from . import get_mock_client from . import get_mock_client

View File

@ -1,9 +1,9 @@
"""Fixtures for Electricity maps integration tests.""" """Fixtures for Electricity maps integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.co2signal import DOMAIN from homeassistant.components.co2signal import DOMAIN
from homeassistant.const import CONF_API_KEY from homeassistant.const import CONF_API_KEY

View File

@ -1,9 +1,9 @@
"""Tests for the comfoconnect sensor platform.""" """Tests for the comfoconnect sensor platform."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.sensor import DOMAIN from homeassistant.components.sensor import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,5 +1,6 @@
"""Test fixtures for the config integration.""" """Test fixtures for the config integration."""
from collections.abc import Generator
from contextlib import contextmanager from contextlib import contextmanager
from copy import deepcopy from copy import deepcopy
import json import json
@ -9,7 +10,6 @@ from typing import Any
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,12 +1,12 @@
"""Test config entries API.""" """Test config entries API."""
from collections import OrderedDict from collections import OrderedDict
from collections.abc import Generator
from http import HTTPStatus from http import HTTPStatus
from unittest.mock import ANY, AsyncMock, patch from unittest.mock import ANY, AsyncMock, patch
from aiohttp.test_utils import TestClient from aiohttp.test_utils import TestClient
import pytest import pytest
from typing_extensions import Generator
import voluptuous as vol import voluptuous as vol
from homeassistant import config_entries as core_ce, data_entry_flow, loader from homeassistant import config_entries as core_ce, data_entry_flow, loader

View File

@ -2,10 +2,10 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.cpuspeed.const import DOMAIN from homeassistant.components.cpuspeed.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -2,6 +2,7 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from crownstone_cloud.cloud_models.spheres import Spheres from crownstone_cloud.cloud_models.spheres import Spheres
@ -11,7 +12,6 @@ from crownstone_cloud.exceptions import (
) )
import pytest import pytest
from serial.tools.list_ports_common import ListPortInfo from serial.tools.list_ports_common import ListPortInfo
from typing_extensions import Generator
from homeassistant.components import usb from homeassistant.components import usb
from homeassistant.components.crownstone.const import ( from homeassistant.components.crownstone.const import (

View File

@ -1,9 +1,9 @@
"""The tests for local file camera component.""" """The tests for local file camera component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.camera import ( from homeassistant.components.camera import (
DOMAIN as CAMERA_DOMAIN, DOMAIN as CAMERA_DOMAIN,

View File

@ -1,9 +1,9 @@
"""The tests for the demo climate component.""" """The tests for the demo climate component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
import voluptuous as vol import voluptuous as vol
from homeassistant.components.climate import ( from homeassistant.components.climate import (

View File

@ -1,10 +1,10 @@
"""The tests for the Demo cover platform.""" """The tests for the Demo cover platform."""
from collections.abc import Generator
from datetime import timedelta from datetime import timedelta
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.cover import ( from homeassistant.components.cover import (
ATTR_CURRENT_POSITION, ATTR_CURRENT_POSITION,

View File

@ -1,10 +1,10 @@
"""The tests for the Demo component.""" """The tests for the Demo component."""
from collections.abc import Generator
import json import json
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.demo import DOMAIN from homeassistant.components.demo import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,9 +1,9 @@
"""The tests for the demo light component.""" """The tests for the demo light component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.demo import DOMAIN from homeassistant.components.demo import DOMAIN
from homeassistant.components.light import ( from homeassistant.components.light import (

View File

@ -1,9 +1,9 @@
"""The tests for the notify demo platform.""" """The tests for the notify demo platform."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import notify from homeassistant.components import notify
from homeassistant.components.demo import DOMAIN from homeassistant.components.demo import DOMAIN

View File

@ -1,9 +1,9 @@
"""The tests for the demo number component.""" """The tests for the demo number component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
import voluptuous as vol import voluptuous as vol
from homeassistant.components.number import ( from homeassistant.components.number import (

View File

@ -1,9 +1,9 @@
"""The tests for the demo switch component.""" """The tests for the demo switch component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.demo import DOMAIN from homeassistant.components.demo import DOMAIN
from homeassistant.components.switch import ( from homeassistant.components.switch import (

View File

@ -1,9 +1,9 @@
"""The tests for the demo text component.""" """The tests for the demo text component."""
from collections.abc import Generator
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.text import ( from homeassistant.components.text import (
ATTR_MAX, ATTR_MAX,

View File

@ -1,9 +1,9 @@
"""Test Device Tracker config entry things.""" """Test Device Tracker config entry things."""
from collections.abc import Generator
from typing import Any from typing import Any
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.device_tracker import ( from homeassistant.components.device_tracker import (
ATTR_HOST_NAME, ATTR_HOST_NAME,

View File

@ -1,5 +1,6 @@
"""The tests for the device tracker component.""" """The tests for the device tracker component."""
from collections.abc import Generator
from datetime import datetime, timedelta from datetime import datetime, timedelta
import json import json
import logging import logging
@ -8,7 +9,6 @@ from types import ModuleType
from unittest.mock import call, patch from unittest.mock import call, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import device_tracker, zone from homeassistant.components import device_tracker, zone
from homeassistant.components.device_tracker import SourceType, const, legacy from homeassistant.components.device_tracker import SourceType, const, legacy

View File

@ -1,9 +1,9 @@
"""Fixtures for tests.""" """Fixtures for tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,10 +1,10 @@
"""Fixtures for Discovergy integration tests.""" """Fixtures for Discovergy integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from pydiscovergy.models import Reading from pydiscovergy.models import Reading
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.discovergy.const import DOMAIN from homeassistant.components.discovergy.const import DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.const import CONF_EMAIL, CONF_PASSWORD

View File

@ -1,11 +1,10 @@
"""Configure pytest for D-Link tests.""" """Configure pytest for D-Link tests."""
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable, Generator
from copy import deepcopy from copy import deepcopy
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components import dhcp from homeassistant.components import dhcp
from homeassistant.components.dlink.const import CONF_USE_LEGACY_PROTOCOL, DOMAIN from homeassistant.components.dlink.const import CONF_USE_LEGACY_PROTOCOL, DOMAIN

View File

@ -1,6 +1,7 @@
"""Common test tools.""" """Common test tools."""
import asyncio import asyncio
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
from dsmr_parser.clients.protocol import DSMRProtocol from dsmr_parser.clients.protocol import DSMRProtocol
@ -15,7 +16,6 @@ from dsmr_parser.obis_references import (
) )
from dsmr_parser.objects import CosemObject from dsmr_parser.objects import CosemObject
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Common fixtures for the duotecno tests.""" """Common fixtures for the duotecno tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -1,9 +1,9 @@
"""Configuration for Deutscher Wetterdienst (DWD) Weather Warnings tests.""" """Configuration for Deutscher Wetterdienst (DWD) Weather Warnings tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, Mock, patch from unittest.mock import AsyncMock, MagicMock, Mock, patch
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.dwd_weather_warnings.const import ( from homeassistant.components.dwd_weather_warnings.const import (
ADVANCE_WARNING_SENSOR, ADVANCE_WARNING_SENSOR,

View File

@ -1,11 +1,11 @@
"""Fixtures for easyEnergy integration tests.""" """Fixtures for easyEnergy integration tests."""
from collections.abc import Generator
import json import json
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from easyenergy import Electricity, Gas from easyenergy import Electricity, Gas
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.easyenergy.const import DOMAIN from homeassistant.components.easyenergy.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,10 +1,10 @@
"""Fixtures for tests.""" """Fixtures for tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
import pytest import pytest
from requests_mock import Mocker from requests_mock import Mocker
from typing_extensions import Generator
from homeassistant.components.ecobee import ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN from homeassistant.components.ecobee import ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN

View File

@ -1,10 +1,10 @@
"""Common fixtures for the Ecoforest tests.""" """Common fixtures for the Ecoforest tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
from pyecoforest.models.device import Alarm, Device, OperationMode, State from pyecoforest.models.device import Alarm, Device, OperationMode, State
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.ecoforest import DOMAIN from homeassistant.components.ecoforest import DOMAIN
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME

View File

@ -1,5 +1,6 @@
"""Common fixtures for the Ecovacs tests.""" """Common fixtures for the Ecovacs tests."""
from collections.abc import AsyncGenerator, Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
@ -9,7 +10,6 @@ from deebot_client.device import Device
from deebot_client.exceptions import ApiError from deebot_client.exceptions import ApiError
from deebot_client.models import Credentials from deebot_client.models import Credentials
import pytest import pytest
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.ecovacs import PLATFORMS from homeassistant.components.ecovacs import PLATFORMS
from homeassistant.components.ecovacs.const import DOMAIN from homeassistant.components.ecovacs.const import DOMAIN

View File

@ -1,9 +1,9 @@
"""Define test fixtures for EDL21.""" """Define test fixtures for EDL21."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
import pytest import pytest
from typing_extensions import Generator
@pytest.fixture @pytest.fixture

View File

@ -2,13 +2,12 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable, Generator
from time import time from time import time
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from electrickiwi_api.model import AccountBalance, Hop, HopIntervals from electrickiwi_api.model import AccountBalance, Hop, HopIntervals
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.application_credentials import ( from homeassistant.components.application_credentials import (
ClientCredential, ClientCredential,

View File

@ -1,10 +1,10 @@
"""Fixtures for Elgato integration tests.""" """Fixtures for Elgato integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from elgato import BatteryInfo, ElgatoNoBatteryError, Info, Settings, State from elgato import BatteryInfo, ElgatoNoBatteryError, Info, Settings, State
import pytest import pytest
from typing_extensions import Generator
from homeassistant.components.elgato.const import DOMAIN from homeassistant.components.elgato.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_PORT from homeassistant.const import CONF_HOST, CONF_MAC, CONF_PORT

Some files were not shown because too many files have changed in this diff Show More