Skip to content

Commit 62d03b5

Browse files
committed
GH-20: Widen LiveServer fixture scopes to session
1 parent a12ba0f commit 62d03b5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ max-line-length = 120
5555
notes = []
5656

5757
[tool.pytest.ini_options]
58-
live_server_scope = "class"
5958
addopts = "--screenshot only-on-failure"
6059

6160
[tool.pylint.messages_control]

tests/e2e/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from tests.e2e.oidc_server.web_client import OidcClient
2525

2626

27-
@pytest.fixture(name="app", scope="class")
27+
@pytest.fixture(name="app", scope="session")
2828
def app_fixture(oidc_server: LiveServer) -> Generator[Flask, Any, Any]:
2929
port = _get_random_port()
3030
client_id = "app"
@@ -70,14 +70,14 @@ def app_client_fixture(live_server: LiveServer) -> Generator[AppClient, Any, Any
7070
client.clear_users()
7171

7272

73-
@pytest.fixture(name="oidc_server_app", scope="class")
73+
@pytest.fixture(name="oidc_server_app", scope="session")
7474
def oidc_server_app_fixture() -> OidcServerApp:
7575
os.environ["AUTHLIB_INSECURE_TRANSPORT"] = "true"
7676
port = _get_random_port()
7777
return oidc_server_create_app({"TESTING": True, "SERVER_NAME": f"localhost:{port}"})
7878

7979

80-
@pytest.fixture(name="oidc_server", scope="class")
80+
@pytest.fixture(name="oidc_server", scope="session")
8181
def oidc_server_fixture(
8282
oidc_server_app: OidcServerApp, request: pytest.FixtureRequest
8383
) -> Generator[LiveServer, Any, Any]:

0 commit comments

Comments
 (0)