Skip to content

Commit a561b91

Browse files
authored
STY: Remove unused pytest fixture (#3183)
Also remove unnecessary assignment before return.
1 parent fcedb98 commit a561b91

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

tests/conftest.py

+2-15
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,16 @@
55

66
import pytest
77

8-
from pypdf import PdfReader
9-
108
TESTS_ROOT = Path(__file__).parent.resolve()
119
PROJECT_ROOT = TESTS_ROOT.parent
1210
RESOURCE_ROOT = PROJECT_ROOT / "resources"
1311

1412

1513
@pytest.fixture(scope="session")
1614
def pdf_file_path(tmp_path_factory):
17-
fn = tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.pdf"
18-
return fn
15+
return tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.pdf"
1916

2017

2118
@pytest.fixture(scope="session")
2219
def txt_file_path(tmp_path_factory):
23-
fn = tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.txt"
24-
return fn
25-
26-
27-
@pytest.fixture(scope="session")
28-
def pdf_reader_page():
29-
"""Gives a page that was retrieved from a PDF via PdfReader."""
30-
pdf_path = RESOURCE_ROOT / "crazyones.pdf"
31-
reader = PdfReader(pdf_path)
32-
page = reader.pages[0]
33-
return page
20+
return tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.txt"

0 commit comments

Comments
 (0)