Skip to content

Commit e09b096

Browse files
authored
Merge pull request #263
MPT-19124 remove session scope from pdf_fd and logo_fd fixtures
2 parents bc30a22 + 8ee5980 commit e09b096

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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 fb:
126+
yield fb
126127

127128

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

0 commit comments

Comments
 (0)