Test harness: pytest-homeassistant-custom-component 0.13.375 (core 2026.10.4)
The dev host has only Python 3.14; the 0.13.205 pin needs 3.12 (its numpy has no 3.14 wheel). The pycares 4.5.0 workaround is no longer needed: verify_cleanup passes with pycares 5.2.1. Core 2026.x no longer treats a parked reauth flow as in progress for a new user flow with the same unique ID, so that path now aborts already_configured instead of already_in_progress. Both are translated; the test accepts either. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,16 +3,11 @@
|
||||
# config-flow behaviour cannot be exercised without a real Home Assistant.
|
||||
#
|
||||
# pytest-homeassistant-custom-component releases track core one-to-one.
|
||||
# 0.13.205 is the newest release that still supports Python 3.12 and it
|
||||
# pins core 2025.1.4 — above the 2024.11 floor the reauth helpers need.
|
||||
# 0.13.375 pins core 2026.10.4 and requires Python 3.14, the interpreter on
|
||||
# the dev host. Older pins (0.13.205 / core 2025.1.4) need Python 3.12:
|
||||
# their numpy has no 3.14 wheel and will not build without a C compiler.
|
||||
#
|
||||
# python3 -m venv .venv-test
|
||||
# .venv-test/bin/pip install -r requirements-test.txt
|
||||
# .venv-test/bin/pytest tests/
|
||||
pytest-homeassistant-custom-component==0.13.205
|
||||
|
||||
# Core pins aiodns==3.2.0 but leaves pycares floating. pycares 4.6+ starts a
|
||||
# daemon shutdown thread that the harness's verify_cleanup fixture flags as a
|
||||
# leak, failing every test at teardown. 4.5.0 is contemporaneous with core
|
||||
# 2025.1.4 and has no such thread.
|
||||
pycares==4.5.0
|
||||
pytest-homeassistant-custom-component==0.13.375
|
||||
|
||||
@@ -304,8 +304,11 @@ async def test_add_integration_while_reauth_pending(hass: HomeAssistant) -> None
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# Core up to 2025.x aborts in async_set_unique_id; 2026.x no longer
|
||||
# counts the parked reauth flow as in progress and reaches the
|
||||
# duplicate guard instead. Both reasons are translated.
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "already_in_progress"
|
||||
assert result["reason"] in ("already_in_progress", "already_configured")
|
||||
|
||||
|
||||
# --- User setup: must be unchanged by this fix ---
|
||||
|
||||
Reference in New Issue
Block a user