From 00573dc358bfa6b7a92db475d2e62cf83f02b3f1 Mon Sep 17 00:00:00 2001 From: gdluck Date: Wed, 28 Oct 2026 17:41:15 +0200 Subject: [PATCH] ci(pytest): set asyncio_default_fixture_loop_scope so pytest-asyncio 1.4.1 does not abort the suite pytest-asyncio 1.4.1 emits PytestDeprecationWarning at configure time when asyncio_default_fixture_loop_scope is unset; with filterwarnings = error::DeprecationWarning that warning becomes an INTERNALERROR before any test is collected (exit code 3 in the Tests & Coverage jobs of every open PR since the release). The suite's async fixtures are all function-scoped, so the option is set to "function", which changes nothing at runtime. Co-Authored-By: Claude Fable 5.1 --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a39384a..80cd918 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,11 @@ OWNd = ["py.typed"] [tool.pytest.ini_options] testpaths = ["tests"] addopts = "-p no:homeassistant" +# pytest-asyncio >= 1.4.1 warns at configure time when this is unset, and +# `filterwarnings = error::DeprecationWarning` below turns that warning into +# an INTERNALERROR before any test is collected. "function" is the scope the +# suite has always used (every async fixture is function-scoped). +asyncio_default_fixture_loop_scope = "function" filterwarnings = [ "error::DeprecationWarning", "error::PendingDeprecationWarning",