Replace several uses of str(path) with fspath(path)

Helps make it more explicit. Did not do this to tests because use of paths
is more involved there.
This commit is contained in:
James R. Barlow
2018-06-22 21:00:47 -07:00
parent 324598e992
commit 76e7e8dbbb
5 changed files with 13 additions and 17 deletions
+1 -5
View File
@@ -34,8 +34,7 @@ import sys
@pytest.fixture
def blank_hocr(tmpdir):
filename = Path(str(tmpdir)) / "blank.hocr"
with open(str(filename), 'w') as f:
f.write(HOCR_TEMPLATE)
filename.write_text(HOCR_TEMPLATE)
return filename
@@ -50,6 +49,3 @@ def test_mono_image(blank_hocr, outdir):
str(outdir / 'mono.pdf'), imageFileName=str(outdir / 'mono.tif'))
qpdf.check(str(outdir / 'mono.pdf'))