(Hopefully) Fix Path <-> py.path conversion on Py3.4/3.5

This commit is contained in:
James R. Barlow
2017-01-26 17:19:15 -08:00
parent 02fba02d31
commit e864c65d26
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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