diff --git a/src/img2pdf_test.py b/src/img2pdf_test.py index 5d46343..55c3b05 100755 --- a/src/img2pdf_test.py +++ b/src/img2pdf_test.py @@ -603,7 +603,7 @@ def alpha_value(): alpha = numpy.zeros((60, 60, 4), dtype=numpy.dtype("int64")) # draw three circles - for (xpos, ypos, color) in [ + for xpos, ypos, color in [ (12, 3, [0xFFFF, 0, 0, 0xFFFF]), (21, 21, [0, 0xFFFF, 0, 0xFFFF]), (3, 21, [0, 0, 0xFFFF, 0xFFFF]), @@ -2331,7 +2331,10 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -2392,7 +2395,10 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "CMYK", str(identify) assert identify[0]["image"].get("type") == "ColorSeparation", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -2451,7 +2457,10 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "CMYK", str(identify) assert identify[0]["image"].get("type") == "ColorSeparation", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 16, str(identify) @@ -2500,7 +2509,10 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -2556,7 +2568,10 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("baseDepth") == 12, str(identify) @@ -2612,7 +2627,10 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("baseDepth") == 14, str(identify) @@ -2668,7 +2686,10 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 16, str(identify) @@ -2725,7 +2746,10 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -2782,7 +2806,10 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 16, str(identify) @@ -2838,7 +2865,10 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Bilevel", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 1, str(identify) @@ -2895,7 +2925,10 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Grayscale", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 2, str(identify) @@ -2952,7 +2985,10 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Grayscale", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 4, str(identify) @@ -3009,7 +3045,10 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Grayscale", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3066,7 +3105,10 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Grayscale", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 16, str(identify) @@ -3125,7 +3167,10 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3165,7 +3210,10 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3214,7 +3262,10 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "Palette", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3264,7 +3315,10 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "Palette", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3314,7 +3368,10 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "Palette", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3364,7 +3421,10 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "Palette", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3427,7 +3487,10 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_path_factory, tmp_gray1_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Bilevel", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 1, str(identify) @@ -3677,7 +3740,10 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_path_factory, tmp_gray1_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Bilevel", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 1, str(identify) @@ -3767,7 +3833,10 @@ def tiff_ccitt_nometa1_img(tmp_path_factory, tmp_gray1_png): assert identify[0]["image"].get("colorspace") == "Gray", str(identify) assert identify[0]["image"].get("type") == "Bilevel", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 1, str(identify) @@ -3851,7 +3920,10 @@ def tiff_ccitt_nometa2_img(tmp_path_factory, tmp_gray1_png): assert identify[0]["image"].get("units") == "PixelsPerInch", str(identify) assert identify[0]["image"].get("type") == "Bilevel", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("colorspace") == "Gray", str(identify) @@ -3920,7 +3992,10 @@ def miff_cmyk8_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "CMYK", str(identify) assert identify[0]["image"].get("type") == "ColorSeparation", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify) @@ -3968,7 +4043,10 @@ def miff_cmyk16_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "CMYK", str(identify) assert identify[0]["image"].get("type") == "ColorSeparation", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 16, str(identify) @@ -4007,7 +4085,10 @@ def miff_rgb8_img(tmp_path_factory, tmp_normal_png): assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" - assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + assert identify[0]["image"].get(endian) in [ + "Undefined", + "LSB", + ], str( identify ) # FIXME: should be LSB assert identify[0]["image"].get("depth") == 8, str(identify)