Add simple test

This commit is contained in:
mara004 2024-08-26 14:40:29 +02:00
parent be313aa793
commit 8d931f9570

View file

@ -7146,6 +7146,17 @@ def test_general(general_input, engine):
pass
def test_return_engine_doc():
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"
)
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)
assert os.path.isfile(outputf)
def main():
normal16 = alpha_value()[:, :, 0:3]
pathlib.Path("test.icc").write_bytes(icc_profile())