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
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:
@@ -76,6 +76,7 @@ explicit_package_bases = true
|
|||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
|
asyncio_default_fixture_loop_scope = "function"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
target-version = "py312"
|
target-version = "py312"
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ class TestFixturesValidateConfiguration:
|
|||||||
self, pytester: pytest.Pytester, body: str, *, asyncio_mode: bool = False
|
self, pytester: pytest.Pytester, body: str, *, asyncio_mode: bool = False
|
||||||
) -> pytest.RunResult:
|
) -> pytest.RunResult:
|
||||||
"""Run a one-test pytester session that loads the Owlbot testing plugin."""
|
"""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:
|
if asyncio_mode:
|
||||||
ini += "asyncio_mode = auto\n"
|
ini += "asyncio_mode = auto\n"
|
||||||
pytester.makeini(ini)
|
pytester.makeini(ini)
|
||||||
|
|||||||
Reference in New Issue
Block a user