From 8ee59803fa068638fd971da7826a9394ef883ae2 Mon Sep 17 00:00:00 2001 From: Lukasz Lancucki Date: Mon, 30 Mar 2026 16:51:47 +0100 Subject: [PATCH] fix(e2e): remove session scope from pdf_fd and logo_fd fixtures --- tests/e2e/conftest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index 92b01d72..f4306e95 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -80,7 +80,7 @@ def project_root_path(): return pathlib.Path(__file__).parent.parent.parent -@pytest.fixture(scope="session") +@pytest.fixture def pdf_fd(): icon_path = pathlib.Path(__file__).parent / "empty.pdf" with pathlib.Path.open(icon_path, "rb") as fd: @@ -119,10 +119,11 @@ def uuid_str(): return str(uuid.uuid4()) -@pytest.fixture(scope="session") +@pytest.fixture def logo_fd(project_root_path): file_path = project_root_path / "tests/data/logo.png" - return file_path.open("rb") + with file_path.open("rb") as fb: + yield fb @pytest.fixture(scope="session")