Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewFlamm committed Apr 4, 2024
1 parent c5ed721 commit ac2d2c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pytest-homeassistant-custom-component

![HA core version](https://img.shields.io/static/v1?label=HA+core+version&message=2024.4.0b8&labelColor=blue)
![HA core version](https://img.shields.io/static/v1?label=HA+core+version&message=2024.4.0&labelColor=blue)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/MatthewFlamm/pytest-homeassistant-custom-component)

Expand Down
2 changes: 1 addition & 1 deletion ha_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.4.0b8
2024.4.0
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ respx==0.21.0
syrupy==4.6.1
tqdm==4.66.2
uv==0.1.24
homeassistant==2024.4.0b8
homeassistant==2024.4.0
SQLAlchemy==2.0.29

paho-mqtt==1.6.1
Expand Down
14 changes: 7 additions & 7 deletions src/pytest_homeassistant_custom_component/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,10 @@ def mock_import_platform(platform_name: str) -> NoReturn:


def mock_platform(
hass: HomeAssistant, platform_path: str, module: Mock | MockPlatform | None = None
hass: HomeAssistant,
platform_path: str,
module: Mock | MockPlatform | None = None,
built_in=True,
) -> None:
"""Mock a platform.
Expand All @@ -1478,7 +1481,7 @@ def mock_platform(
module_cache = hass.data[loader.DATA_COMPONENTS]

if domain not in integration_cache:
mock_integration(hass, MockModule(domain))
mock_integration(hass, MockModule(domain), built_in=built_in)

integration_cache[domain]._top_level_files.add(f"{platform_name}.py")
_LOGGER.info("Adding mock integration platform: %s", platform_path)
Expand Down Expand Up @@ -1671,6 +1674,7 @@ def setup_test_component_platform(
domain: str,
entities: Sequence[Entity],
from_config_entry: bool = False,
built_in: bool = True,
) -> MockPlatform:
"""Mock a test component platform for ."""

Expand Down Expand Up @@ -1701,9 +1705,5 @@ async def _async_setup_entry(
platform.async_setup_entry = _async_setup_entry
platform.async_setup_platform = None

mock_platform(
hass,
f"test.{domain}",
platform,
)
mock_platform(hass, f"test.{domain}", platform, built_in=built_in)
return platform
2 changes: 1 addition & 1 deletion src/pytest_homeassistant_custom_component/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
from typing import Final
MAJOR_VERSION: Final = 2024
MINOR_VERSION: Final = 4
PATCH_VERSION: Final = "0b8"
PATCH_VERSION: Final = "0"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.110
0.13.111

0 comments on commit ac2d2c1

Please sign in to comment.