Write to tmp path rather than output/
output seems to be part of the git repository and used for comparisons
This commit is contained in:
parent
d4b49c510a
commit
316629fa40
1 changed files with 2 additions and 4 deletions
|
@ -7146,11 +7146,9 @@ def test_general(general_input, engine):
|
|||
pass
|
||||
|
||||
|
||||
def test_return_engine_doc():
|
||||
def test_return_engine_doc(tmp_path_factory):
|
||||
inputf = os.path.join(os.path.dirname(__file__), "tests", "input", "normal.jpg")
|
||||
outputf = os.path.join(
|
||||
os.path.dirname(__file__), "tests", "output", "engine_normal.jpg.pdf"
|
||||
)
|
||||
outputf = tmp_path_factory.mktemp("return_engine_doc") / "normal.jpg.pdf"
|
||||
pdf, min_version = img2pdf.convert(inputf, return_engine_doc=True, engine=img2pdf.Engine.pikepdf)
|
||||
assert isinstance(pdf, pikepdf.Pdf)
|
||||
pdf.save(outputf, min_version=min_version, linearize=True)
|
||||
|
|
Loading…
Reference in a new issue