Skip to content

Commit de1a71f

Browse files
committed
fix(e2e): remove session scope from pdf_fd and logo_fd fixtures
1 parent bc30a22 commit de1a71f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/e2e/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def project_root_path():
8080
return pathlib.Path(__file__).parent.parent.parent
8181

8282

83-
@pytest.fixture(scope="session")
83+
@pytest.fixture
8484
def pdf_fd():
8585
icon_path = pathlib.Path(__file__).parent / "empty.pdf"
8686
with pathlib.Path.open(icon_path, "rb") as fd:
@@ -119,10 +119,11 @@ def uuid_str():
119119
return str(uuid.uuid4())
120120

121121

122-
@pytest.fixture(scope="session")
122+
@pytest.fixture
123123
def logo_fd(project_root_path):
124124
file_path = project_root_path / "tests/data/logo.png"
125-
return file_path.open("rb")
125+
with file_path.open("rb") as file:
126+
yield file
126127

127128

128129
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)