tests: convert all uses of multipage.pdf to fixture

This commit is contained in:
James R. Barlow
2022-08-11 01:13:10 -07:00
parent 545cd031b0
commit f4155dca77
5 changed files with 21 additions and 13 deletions
+6 -1
View File
@@ -44,7 +44,7 @@ TESTS_ROOT = Path(__file__).parent.resolve()
PROJECT_ROOT = TESTS_ROOT
@pytest.fixture
@pytest.fixture(scope="session")
def resources() -> Path:
return Path(TESTS_ROOT) / 'resources'
@@ -78,6 +78,11 @@ def no_outpdf(tmp_path) -> Path:
return tmp_path / 'no_output.pdf'
@pytest.fixture(scope="session")
def multipage(resources):
return resources / 'multipage.pdf'
def check_ocrmypdf(input_file: Path, output_file: Path, *args) -> Path:
"""Run ocrmypdf and confirm that a valid plausible PDF was created."""
api_args = [str(input_file), str(output_file)] + [