From ecd4c70207411d71861aa7f15d63b041de8f818d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 06:58:24 +0000 Subject: [PATCH 1/2] Bump pytest-asyncio from 0.26.0 to 1.4.0 Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.26.0 to 1.4.0. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.26.0...v1.4.0) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index a559438f2c9..d515e9d6f21 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,7 +5,7 @@ josepy<3 # https://github.com/aio-libs/aiodns/issues/214 pycares<5 pytest==8.4.2 -pytest-asyncio==0.26.0 +pytest-asyncio==1.4.0 pytest-cov==7.1.0 pytest-snapshot==0.9.0 pytest-socket==0.8.0 From dc96a2918ca9ccf629584340aa7396d75f9c780f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 06:59:38 +0000 Subject: [PATCH 2/2] Add event_loop fixture compatibility for pytest-asyncio 1.x --- tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index e2b47d7fd19..c908c6f6a35 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -102,6 +102,16 @@ def connection(): return MagicMock() +@pytest.fixture +def event_loop(event_loop_policy): + """Provide compatibility event loop fixture for pytest-asyncio>=1.0.""" + loop = event_loop_policy.new_event_loop() + try: + yield loop + finally: + loop.close() + + @pytest.fixture def hass_storage(): """Fixture to mock storage."""