Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STY: Remove unused pytest fixture #3183

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,16 @@

import pytest

from pypdf import PdfReader

TESTS_ROOT = Path(__file__).parent.resolve()
PROJECT_ROOT = TESTS_ROOT.parent
RESOURCE_ROOT = PROJECT_ROOT / "resources"


@pytest.fixture(scope="session")
def pdf_file_path(tmp_path_factory):
fn = tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.pdf"
return fn
return tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.pdf"


@pytest.fixture(scope="session")
def txt_file_path(tmp_path_factory):
fn = tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.txt"
return fn


@pytest.fixture(scope="session")
def pdf_reader_page():
"""Gives a page that was retrieved from a PDF via PdfReader."""
pdf_path = RESOURCE_ROOT / "crazyones.pdf"
reader = PdfReader(pdf_path)
page = reader.pages[0]
return page
return tmp_path_factory.mktemp("pypdf-data") / f"{uuid.uuid4()}.txt"
Loading