diff --git a/tests/conftest.py b/tests/conftest.py index 8b690bfe..7ea22f9a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -67,12 +67,12 @@ def ocrmypdf_exec(): @pytest.fixture(scope="function") def outdir(tmpdir): - return Path(tmpdir) + return Path(str(tmpdir)) @pytest.fixture(scope="function") def outpdf(tmpdir): - return str(Path(tmpdir) / 'out.pdf') + return str(Path(str(tmpdir)) / 'out.pdf') @pytest.fixture(scope="function") @@ -81,7 +81,7 @@ def no_outpdf(tmpdir): output. Unfortunately an assertion failure inside a test fixture produces an error rather than a test failure, so no testing is done. It's up to the test to confirm that no output file was created.""" - return str(Path(tmpdir) / 'no_output.pdf') + return str(Path(str(tmpdir)) / 'no_output.pdf') @pytest.helpers.register diff --git a/tests/test_hocrtransform.py b/tests/test_hocrtransform.py index 75e1fe8f..d792ca76 100644 --- a/tests/test_hocrtransform.py +++ b/tests/test_hocrtransform.py @@ -19,7 +19,7 @@ import sys @pytest.fixture def blank_hocr(tmpdir): - filename = Path(tmpdir) / "blank.hocr" + filename = Path(str(tmpdir)) / "blank.hocr" with open(filename, 'w') as f: f.write(HOCR_TEMPLATE) return filename