Fixed pytest-asyncio deprecation warning.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 18s
CI / Tests (Python 3.13) (push) Successful in 18s
CI / Tests (Python 3.14) (push) Successful in 13s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 6s

This commit is contained in:
2026-04-22 21:57:50 -04:00
parent a671541b13
commit 867161adf1
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -76,6 +76,7 @@ explicit_package_bases = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.ruff]
target-version = "py312"
+1 -1
View File
@@ -218,7 +218,7 @@ class TestFixturesValidateConfiguration:
self, pytester: pytest.Pytester, body: str, *, asyncio_mode: bool = False
) -> pytest.RunResult:
"""Run a one-test pytester session that loads the Owlbot testing plugin."""
ini = "[pytest]\n"
ini = "[pytest]\nasyncio_default_fixture_loop_scope = function\n"
if asyncio_mode:
ini += "asyncio_mode = auto\n"
pytester.makeini(ini)