From 9cd512147732c214a5f4f197f45f604762d2699b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zahola?= Date: Sat, 19 Jun 2021 18:53:45 +0200 Subject: [PATCH] Test support on macOS --- src/img2pdf_test.py | 392 +++++++++++++++++++++++++++++++------------- 1 file changed, 277 insertions(+), 115 deletions(-) diff --git a/src/img2pdf_test.py b/src/img2pdf_test.py index 33a7dae..c91079c 100755 --- a/src/img2pdf_test.py +++ b/src/img2pdf_test.py @@ -1110,7 +1110,7 @@ def jpg_2000_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "JP2", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "JPEG-2000 File Format Syntax" + identify[0]["image"].get("formatDescription") in ["JPEG-2000 File Format Syntax", "JP2"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/jp2", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1146,7 +1146,7 @@ def png_rgb8_img(tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1199,7 +1199,7 @@ def png_rgb16_img(tmp_normal16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1256,7 +1256,7 @@ def png_rgba8_img(tmp_path_factory, tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1310,7 +1310,7 @@ def png_rgba16_img(tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1380,7 +1380,7 @@ def png_gray8a_img(tmp_path_factory, tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1446,7 +1446,7 @@ def png_gray16a_img(tmp_path_factory, tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1504,7 +1504,7 @@ def png_interlaced_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1559,7 +1559,7 @@ def png_gray1_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1613,7 +1613,7 @@ def png_gray2_img(tmp_path_factory, tmp_gray2_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1667,7 +1667,7 @@ def png_gray4_img(tmp_path_factory, tmp_gray4_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1721,7 +1721,7 @@ def png_gray8_img(tmp_path_factory, tmp_gray8_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1775,7 +1775,7 @@ def png_gray16_img(tmp_path_factory, tmp_gray16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1830,7 +1830,7 @@ def png_palette1_img(tmp_path_factory, tmp_palette1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1884,7 +1884,7 @@ def png_palette2_img(tmp_path_factory, tmp_palette2_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1938,7 +1938,7 @@ def png_palette4_img(tmp_path_factory, tmp_palette4_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -1992,7 +1992,7 @@ def png_palette8_img(tmp_path_factory, tmp_palette8_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2047,7 +2047,7 @@ def gif_transparent_img(tmp_path_factory, tmp_alpha_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2086,7 +2086,7 @@ def gif_palette1_img(tmp_path_factory, tmp_palette1_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2125,7 +2125,7 @@ def gif_palette2_img(tmp_path_factory, tmp_palette2_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2164,7 +2164,7 @@ def gif_palette4_img(tmp_path_factory, tmp_palette4_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2203,7 +2203,7 @@ def gif_palette8_img(tmp_path_factory, tmp_palette8_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2246,7 +2246,7 @@ def gif_animation_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2279,7 +2279,7 @@ def gif_animation_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert identify[0]["image"].get("format") == "GIF", str(identify) assert ( identify[0]["image"]["formatDescription"] - == "CompuServe graphics interchange format" + in ["CompuServe graphics interchange format", "GIF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/gif", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2328,7 +2328,7 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2373,7 +2373,15 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png): def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png): in_img = tmp_path_factory.mktemp("tiff_cmyk8") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_normal_png), "-colorspace", "cmyk", str(in_img)] + [ + "convert", + str(tmp_normal_png), + "-colorspace", + "cmyk", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2385,7 +2393,7 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2433,6 +2441,8 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png): "16", "-colorspace", "cmyk", + "-compress", + "Zip", str(in_img), ] ) @@ -2446,7 +2456,7 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2486,7 +2496,15 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png): @pytest.fixture(scope="session") def tiff_rgb8_img(tmp_path_factory, tmp_normal_png): in_img = tmp_path_factory.mktemp("tiff_rgb8") / "in.tiff" - subprocess.check_call(["convert", str(tmp_normal_png), str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_normal_png), + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -2497,7 +2515,7 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2537,7 +2555,15 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png): def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png): in_img = tmp_path_factory.mktemp("tiff_rgb8") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_normal16_png), "-depth", "12", str(in_img)] + [ + "convert", + str(tmp_normal16_png), + "-depth", + "12", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2549,7 +2575,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2593,7 +2619,15 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png): def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png): in_img = tmp_path_factory.mktemp("tiff_rgb8") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_normal16_png), "-depth", "14", str(in_img)] + [ + "convert", + str(tmp_normal16_png), + "-depth", + "14", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2605,7 +2639,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2649,7 +2683,15 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png): def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png): in_img = tmp_path_factory.mktemp("tiff_rgb8") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_normal16_png), "-depth", "16", str(in_img)] + [ + "convert", + str(tmp_normal16_png), + "-depth", + "16", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2661,7 +2703,7 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2701,7 +2743,16 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png): def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png): in_img = tmp_path_factory.mktemp("tiff_rgba8") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_alpha_png), "-depth", "8", "-strip", str(in_img)] + [ + "convert", + str(tmp_alpha_png), + "-depth", + "8", + "-strip", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2713,7 +2764,7 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2753,7 +2804,16 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png): def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png): in_img = tmp_path_factory.mktemp("tiff_rgba16") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_alpha_png), "-depth", "16", "-strip", str(in_img)] + [ + "convert", + str(tmp_alpha_png), + "-depth", + "16", + "-strip", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 @@ -2765,7 +2825,7 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2804,7 +2864,17 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png): @pytest.fixture(scope="session") def tiff_gray1_img(tmp_path_factory, tmp_gray1_png): in_img = tmp_path_factory.mktemp("tiff_gray1") / "in.tiff" - subprocess.check_call(["convert", str(tmp_gray1_png), "-depth", "1", str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_gray1_png), + "-depth", + "1", + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -2815,7 +2885,7 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2855,7 +2925,17 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png): @pytest.fixture(scope="session") def tiff_gray2_img(tmp_path_factory, tmp_gray2_png): in_img = tmp_path_factory.mktemp("tiff_gray2") / "in.tiff" - subprocess.check_call(["convert", str(tmp_gray2_png), "-depth", "2", str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_gray2_png), + "-depth", + "2", + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -2866,7 +2946,7 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2906,7 +2986,17 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png): @pytest.fixture(scope="session") def tiff_gray4_img(tmp_path_factory, tmp_gray4_png): in_img = tmp_path_factory.mktemp("tiff_gray4") / "in.tiff" - subprocess.check_call(["convert", str(tmp_gray4_png), "-depth", "4", str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_gray4_png), + "-depth", + "4", + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -2917,7 +3007,7 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -2957,7 +3047,17 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png): @pytest.fixture(scope="session") def tiff_gray8_img(tmp_path_factory, tmp_gray8_png): in_img = tmp_path_factory.mktemp("tiff_gray8") / "in.tiff" - subprocess.check_call(["convert", str(tmp_gray8_png), "-depth", "8", str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_gray8_png), + "-depth", + "8", + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -2968,7 +3068,7 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3008,7 +3108,17 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png): @pytest.fixture(scope="session") def tiff_gray16_img(tmp_path_factory, tmp_gray16_png): in_img = tmp_path_factory.mktemp("tiff_gray16") / "in.tiff" - subprocess.check_call(["convert", str(tmp_gray16_png), "-depth", "16", str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_gray16_png), + "-depth", + "16", + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -3019,7 +3129,7 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3060,7 +3170,15 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png): def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): in_img = tmp_path_factory.mktemp("tiff_multipage_img") / "in.tiff" subprocess.check_call( - ["convert", str(tmp_normal_png), str(tmp_inverse_png), "-strip", str(in_img)] + [ + "convert", + str(tmp_normal_png), + str(tmp_inverse_png), + "-strip", + "-compress", + "Zip", + str(in_img) + ] ) identify = json.loads( subprocess.check_output(["convert", str(in_img) + "[0]", "json:"]) @@ -3074,7 +3192,7 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3118,7 +3236,7 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3158,7 +3276,15 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): @pytest.fixture(scope="session") def tiff_palette1_img(tmp_path_factory, tmp_palette1_png): in_img = tmp_path_factory.mktemp("tiff_palette1_img") / "in.tiff" - subprocess.check_call(["convert", str(tmp_palette1_png), str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_palette1_png), + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -3169,7 +3295,7 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3210,7 +3336,15 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png): @pytest.fixture(scope="session") def tiff_palette2_img(tmp_path_factory, tmp_palette2_png): in_img = tmp_path_factory.mktemp("tiff_palette2_img") / "in.tiff" - subprocess.check_call(["convert", str(tmp_palette2_png), str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_palette2_png), + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -3221,7 +3355,7 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3262,7 +3396,15 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png): @pytest.fixture(scope="session") def tiff_palette4_img(tmp_path_factory, tmp_palette4_png): in_img = tmp_path_factory.mktemp("tiff_palette4_img") / "in.tiff" - subprocess.check_call(["convert", str(tmp_palette4_png), str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_palette4_png), + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -3273,7 +3415,7 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3314,7 +3456,15 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png): @pytest.fixture(scope="session") def tiff_palette8_img(tmp_path_factory, tmp_palette8_png): in_img = tmp_path_factory.mktemp("tiff_palette8_img") / "in.tiff" - subprocess.check_call(["convert", str(tmp_palette8_png), str(in_img)]) + subprocess.check_call( + [ + "convert", + str(tmp_palette8_png), + "-compress", + "Zip", + str(in_img) + ] + ) identify = json.loads(subprocess.check_output(["convert", str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was @@ -3325,7 +3475,7 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3377,6 +3527,8 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=msb", "-define", "quantum:polarity=min-is-white", + "-compress", + "Group4", str(in_img), ] ) @@ -3390,7 +3542,7 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3459,6 +3611,8 @@ def tiff_ccitt_msb_m2l_white_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=msb", "-define", "quantum:polarity=min-is-white", + "-compress", + "Group4", str(in_img), ] ) @@ -3472,7 +3626,7 @@ def tiff_ccitt_msb_m2l_white_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3542,6 +3696,8 @@ def tiff_ccitt_msb_l2m_white_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=lsb", "-define", "quantum:polarity=min-is-white", + "-compress", + "Group4", str(in_img), ] ) @@ -3555,7 +3711,7 @@ def tiff_ccitt_msb_l2m_white_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3630,6 +3786,8 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=msb", "-define", "quantum:polarity=min-is-black", + "-compress", + "Group4", str(in_img), ] ) @@ -3643,7 +3801,7 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3712,6 +3870,8 @@ def tiff_ccitt_nometa1_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=msb", "-define", "quantum:polarity=min-is-white", + "-compress", + "Group4", str(in_img), ] ) @@ -3734,7 +3894,7 @@ def tiff_ccitt_nometa1_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3803,6 +3963,8 @@ def tiff_ccitt_nometa2_img(tmp_path_factory, tmp_gray1_png): "tiff:fill-order=msb", "-define", "quantum:polarity=min-is-white", + "-compress", + "Group4", str(in_img), ] ) @@ -3819,7 +3981,7 @@ def tiff_ccitt_nometa2_img(tmp_path_factory, tmp_gray1_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Tagged Image File Format" + identify[0]["image"].get("formatDescription") in ["Tagged Image File Format", "TIFF"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { @@ -3881,7 +4043,7 @@ def png_icc_img(tmp_icc_png): assert "image" in identify[0] assert identify[0]["image"].get("format") == "PNG", str(identify) assert ( - identify[0]["image"].get("formatDescription") == "Portable Network Graphics" + identify[0]["image"].get("formatDescription") in ["Portable Network Graphics", "PNG"] ), str(identify) assert identify[0]["image"].get("mimeType") == "image/png", str(identify) assert identify[0]["image"].get("geometry") == { @@ -5212,7 +5374,7 @@ def test_jpg_cmyk(tmp_path_factory, jpg_cmyk_img, jpg_cmyk_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.skipif( @@ -5227,7 +5389,7 @@ def test_jpg_2000(tmp_path_factory, jpg_2000_img, jpg_2000_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_rgb8(tmp_path_factory, png_rgb8_img, png_rgb8_pdf): @@ -5239,7 +5401,7 @@ def test_png_rgb8(tmp_path_factory, png_rgb8_img, png_rgb8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_rgb16(tmp_path_factory, png_rgb16_img, png_rgb16_pdf): @@ -5251,7 +5413,7 @@ def test_png_rgb16(tmp_path_factory, png_rgb16_img, png_rgb16_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5274,7 +5436,7 @@ def test_png_rgba8(tmp_path_factory, png_rgba8_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5297,7 +5459,7 @@ def test_png_rgba16(tmp_path_factory, png_rgba16_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5320,7 +5482,7 @@ def test_png_gray8a(tmp_path_factory, png_gray8a_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5343,7 +5505,7 @@ def test_png_gray16a(tmp_path_factory, png_gray16a_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_interlaced(tmp_path_factory, png_interlaced_img, png_interlaced_pdf): @@ -5355,7 +5517,7 @@ def test_png_interlaced(tmp_path_factory, png_interlaced_img, png_interlaced_pdf @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_gray1(tmp_path_factory, png_gray1_img, png_gray1_pdf): @@ -5367,7 +5529,7 @@ def test_png_gray1(tmp_path_factory, png_gray1_img, png_gray1_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_gray2(tmp_path_factory, png_gray2_img, png_gray2_pdf): @@ -5379,7 +5541,7 @@ def test_png_gray2(tmp_path_factory, png_gray2_img, png_gray2_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_gray4(tmp_path_factory, png_gray4_img, png_gray4_pdf): @@ -5391,7 +5553,7 @@ def test_png_gray4(tmp_path_factory, png_gray4_img, png_gray4_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_gray8(tmp_path_factory, png_gray8_img, png_gray8_pdf): @@ -5403,7 +5565,7 @@ def test_png_gray8(tmp_path_factory, png_gray8_img, png_gray8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_gray16(tmp_path_factory, png_gray16_img, png_gray16_pdf): @@ -5419,7 +5581,7 @@ def test_png_gray16(tmp_path_factory, png_gray16_img, png_gray16_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_palette1(tmp_path_factory, png_palette1_img, png_palette1_pdf): @@ -5431,7 +5593,7 @@ def test_png_palette1(tmp_path_factory, png_palette1_img, png_palette1_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_palette2(tmp_path_factory, png_palette2_img, png_palette2_pdf): @@ -5443,7 +5605,7 @@ def test_png_palette2(tmp_path_factory, png_palette2_img, png_palette2_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_palette4(tmp_path_factory, png_palette4_img, png_palette4_pdf): @@ -5455,7 +5617,7 @@ def test_png_palette4(tmp_path_factory, png_palette4_img, png_palette4_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_png_palette8(tmp_path_factory, png_palette8_img, png_palette8_pdf): @@ -5479,7 +5641,7 @@ def test_png_icc(tmp_path_factory, png_icc_img, png_icc_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5502,7 +5664,7 @@ def test_gif_transparent(tmp_path_factory, gif_transparent_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_gif_palette1(tmp_path_factory, gif_palette1_img, gif_palette1_pdf): @@ -5514,7 +5676,7 @@ def test_gif_palette1(tmp_path_factory, gif_palette1_img, gif_palette1_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_gif_palette2(tmp_path_factory, gif_palette2_img, gif_palette2_pdf): @@ -5526,7 +5688,7 @@ def test_gif_palette2(tmp_path_factory, gif_palette2_img, gif_palette2_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_gif_palette4(tmp_path_factory, gif_palette4_img, gif_palette4_pdf): @@ -5538,7 +5700,7 @@ def test_gif_palette4(tmp_path_factory, gif_palette4_img, gif_palette4_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_gif_palette8(tmp_path_factory, gif_palette8_img, gif_palette8_pdf): @@ -5550,7 +5712,7 @@ def test_gif_palette8(tmp_path_factory, gif_palette8_img, gif_palette8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_gif_animation(tmp_path_factory, gif_animation_img, gif_animation_pdf): @@ -5597,7 +5759,7 @@ def test_tiff_float(tmp_path_factory, tiff_float_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_cmyk8(tmp_path_factory, tiff_cmyk8_img, tiff_cmyk8_pdf): @@ -5611,7 +5773,7 @@ def test_tiff_cmyk8(tmp_path_factory, tiff_cmyk8_img, tiff_cmyk8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5635,7 +5797,7 @@ def test_tiff_cmyk16(tmp_path_factory, tiff_cmyk16_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_rgb8(tmp_path_factory, tiff_rgb8_img, tiff_rgb8_pdf): @@ -5647,7 +5809,7 @@ def test_tiff_rgb8(tmp_path_factory, tiff_rgb8_img, tiff_rgb8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5671,7 +5833,7 @@ def test_tiff_rgb12(tmp_path_factory, tiff_rgb12_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5695,7 +5857,7 @@ def test_tiff_rgb14(tmp_path_factory, tiff_rgb14_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5719,7 +5881,7 @@ def test_tiff_rgb16(tmp_path_factory, tiff_rgb16_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5742,7 +5904,7 @@ def test_tiff_rgba8(tmp_path_factory, tiff_rgba8_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5765,7 +5927,7 @@ def test_tiff_rgba16(tmp_path_factory, tiff_rgba16_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_gray1(tmp_path_factory, tiff_gray1_img, tiff_gray1_pdf): @@ -5777,7 +5939,7 @@ def test_tiff_gray1(tmp_path_factory, tiff_gray1_img, tiff_gray1_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_gray2(tmp_path_factory, tiff_gray2_img, tiff_gray2_pdf): @@ -5789,7 +5951,7 @@ def test_tiff_gray2(tmp_path_factory, tiff_gray2_img, tiff_gray2_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_gray4(tmp_path_factory, tiff_gray4_img, tiff_gray4_pdf): @@ -5801,7 +5963,7 @@ def test_tiff_gray4(tmp_path_factory, tiff_gray4_img, tiff_gray4_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_gray8(tmp_path_factory, tiff_gray8_img, tiff_gray8_pdf): @@ -5813,7 +5975,7 @@ def test_tiff_gray8(tmp_path_factory, tiff_gray8_img, tiff_gray8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) @pytest.mark.parametrize("engine", ["internal", "pikepdf", "pdfrw"]) @@ -5836,7 +5998,7 @@ def test_tiff_gray16(tmp_path_factory, tiff_gray16_img, engine): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_multipage(tmp_path_factory, tiff_multipage_img, tiff_multipage_pdf): @@ -5866,7 +6028,7 @@ def test_tiff_multipage(tmp_path_factory, tiff_multipage_img, tiff_multipage_pdf reason="requires imagemagick with support for keeping the palette depth", ) @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_palette1(tmp_path_factory, tiff_palette1_img, tiff_palette1_pdf): @@ -5882,7 +6044,7 @@ def test_tiff_palette1(tmp_path_factory, tiff_palette1_img, tiff_palette1_pdf): reason="requires imagemagick with support for keeping the palette depth", ) @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_palette2(tmp_path_factory, tiff_palette2_img, tiff_palette2_pdf): @@ -5898,7 +6060,7 @@ def test_tiff_palette2(tmp_path_factory, tiff_palette2_img, tiff_palette2_pdf): reason="requires imagemagick with support for keeping the palette depth", ) @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_palette4(tmp_path_factory, tiff_palette4_img, tiff_palette4_pdf): @@ -5910,7 +6072,7 @@ def test_tiff_palette4(tmp_path_factory, tiff_palette4_img, tiff_palette4_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_palette8(tmp_path_factory, tiff_palette8_img, tiff_palette8_pdf): @@ -5922,7 +6084,7 @@ def test_tiff_palette8(tmp_path_factory, tiff_palette8_img, tiff_palette8_pdf): @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_lsb_m2l_white( @@ -5943,7 +6105,7 @@ def test_tiff_ccitt_lsb_m2l_white( @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_msb_m2l_white( @@ -5964,7 +6126,7 @@ def test_tiff_ccitt_msb_m2l_white( @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_msb_l2m_white( @@ -5989,7 +6151,7 @@ def test_tiff_ccitt_msb_l2m_white( reason="requires imagemagick with support for min-is-black", ) @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_lsb_m2l_black( @@ -6010,7 +6172,7 @@ def test_tiff_ccitt_lsb_m2l_black( @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_nometa1( @@ -6026,7 +6188,7 @@ def test_tiff_ccitt_nometa1( @pytest.mark.skipif( - sys.platform in ["darwin", "win32"], + sys.platform in ["win32"], reason="test utilities not available on Windows and MacOS", ) def test_tiff_ccitt_nometa2(