Skip to content

Migrate the tests to HA core's pytest-homeassistant - #178

Merged
amitfin merged 1 commit into
mainfrom
migrate-pytest-homeassistant
Nov 8, 2026
Merged

amitfin merged 1 commit into
mainfrom
migrate-pytest-homeassistant

Conversation

@amitfin

@amitfin amitfin commented Nov 8, 2026

Copy link
Copy Markdown
Owner

pytest-homeassistant-custom-component was discontinued after 0.13.375
(HA 2026.10.4). Its replacement, pytest-homeassistant, is released with
Home Assistant from 2026.11.

  • Tests import from pytest_homeassistant. It enables custom integrations
    by default, so the conftest.py wrapper is gone.
  • pytest.ini follows the package's recommended config (-p no:respx and the
    asyncio fixture loop scope). scripts/setup removes the old package and
    installs pytest-homeassistant and pytest-cov.
  • HA 2026.11 annotates the action schema as probatio.Schema, so the reload
    schema gets a commented type ignore (the minimum version predates
    probatio).
  • Import datetime as dt: the current ruff flags the plain import (ICN001).

Mirrors amitfin/retry#251.

🤖 Generated with Claude Code

pytest-homeassistant-custom-component was discontinued after 0.13.375
(HA 2026.10.4). Its replacement, pytest-homeassistant, is released with
Home Assistant from 2026.11.

- Tests import from pytest_homeassistant. It enables custom integrations
  by default, so the conftest.py wrapper is gone.
- pytest.ini follows the package's recommended config (-p no:respx and the
  asyncio fixture loop scope). scripts/setup removes the old package and
  installs pytest-homeassistant and pytest-cov.
- HA 2026.11 annotates the action schema as probatio.Schema, so the reload
  schema gets a commented type ignore (the minimum version predates
  probatio).
- Import datetime as dt: the current ruff flags the plain import (ICN001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amitfin
amitfin merged commit a065923 into main Nov 8, 2026
6 checks passed
@amitfin
amitfin deleted the migrate-pytest-homeassistant branch November 8, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant