Skip to content

Commit af10cfa

Browse files
committed
chore: update pytest-asyncio
1 parent 25fb05d commit af10cfa

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

local-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ autobahn==23.1.2
22
black==25.1.0
33
build==1.2.2.post1
44
flake8==7.1.2
5+
git+https://github.com/pytest-dev/pytest-asyncio
56
mypy==1.15.0
67
objgraph==3.6.2
78
Pillow==11.1.0
89
pixelmatch==0.3.0
910
pre-commit==3.5.0
1011
pyOpenSSL==25.0.0
1112
pytest==8.3.5
12-
pytest-asyncio==0.25.3
1313
pytest-cov==6.0.0
1414
pytest-repeat==0.9.3
1515
pytest-rerunfailures==15.0

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ markers = [
6767
junit_family = "xunit2"
6868
asyncio_mode = "auto"
6969
asyncio_default_fixture_loop_scope = "session"
70+
asyncio_default_test_loop_scope = "session"
7071

7172
[tool.mypy]
7273
ignore_missing_imports = true

tests/async/conftest.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
# limitations under the License.
1414

1515
import asyncio
16-
from typing import Any, AsyncGenerator, Awaitable, Callable, Dict, Generator, List
16+
from typing import Any, AsyncGenerator, Awaitable, Callable, Dict, Generator
1717

1818
import pytest
19-
from pytest_asyncio import is_async_test
2019

2120
from playwright.async_api import (
2221
Browser,
@@ -37,14 +36,6 @@ def utils() -> Generator[Utils, None, None]:
3736
yield utils_object
3837

3938

40-
# Will mark all the tests as async
41-
def pytest_collection_modifyitems(items: List[pytest.Item]) -> None:
42-
pytest_asyncio_tests = (item for item in items if is_async_test(item))
43-
session_scope_marker = pytest.mark.asyncio(loop_scope="session")
44-
for async_test in pytest_asyncio_tests:
45-
async_test.add_marker(session_scope_marker, append=False)
46-
47-
4839
@pytest.fixture(scope="session")
4940
async def playwright() -> AsyncGenerator[Playwright, None]:
5041
async with async_playwright() as playwright_object:

0 commit comments

Comments
 (0)