test_png_rgb16 test_png_gray16 assertion failures on Fedora Rawhide #210

Open
opened 2025-05-11 12:41:06 +00:00 by gms · 1 comment

On current Fedora Rawhide, some assertions are now failing (img2pdf 0.6.1 release):

=========================== short test summary info ============================
FAILED src/img2pdf_test.py::test_png_rgb16[internal] - AssertionError: b'4.27...
FAILED src/img2pdf_test.py::test_png_rgb16[pikepdf] - AssertionError: b'4.275...
FAILED src/img2pdf_test.py::test_png_gray16[internal] - AssertionError: b'4.2...
FAILED src/img2pdf_test.py::test_png_gray16[pikepdf] - AssertionError: b'4.24...
=========== 4 failed, 334 passed, 8 skipped, 6 deselected in 50.67s ============

First failure in more detail:

            assert psnr != b"0"
            assert psnr != b"0 (0)"
>           assert psnr_re.fullmatch(psnr) is not None, psnr
E           AssertionError: b'4.27547e-05 (8.87677e-07)'
E           assert None is not None
E            +  where None = <built-in method fullmatch of re.Pattern object at 0xffff87f3e510>(b'4.27547e-05 (8.87677e-07)')
E            +    where <built-in method fullmatch of re.Pattern object at 0xffff87f3e510> = re.compile(b'((?:inf|(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?))(?: \\([0-9.]+\\))?').fullmatch
src/img2pdf_test.py:389: AssertionError

cf. https://kojipkgs.fedoraproject.org//work/tasks/8776/132588776/build.log
https://koji.fedoraproject.org/koji/taskinfo?taskID=132588776

NB: Those assertion previously succeeded on Rawhide (with img2pdf 0.6.0).

Since the delta between img2pdf 0.6.0 and 0.6.1 isn't that big, the failures may very well be caused by changes in the dependencies, in particular ImageMagick, since rawhide is kind of bleeding edge.

In that last run the environment has:

DEBUG util.py:461:   ImageMagick                          aarch64 1:7.1.1.47-1.fc43       build      140.2 KiB
DEBUG util.py:461:   icc-profiles-openicc                 noarch  1.3.1-29.fc42           build        1.7 MiB
DEBUG util.py:461:   libpng                               aarch64 2:1.6.48-1.fc43         build      269.8 KiB
On current Fedora Rawhide, some assertions are now failing (img2pdf 0.6.1 release): ``` =========================== short test summary info ============================ FAILED src/img2pdf_test.py::test_png_rgb16[internal] - AssertionError: b'4.27... FAILED src/img2pdf_test.py::test_png_rgb16[pikepdf] - AssertionError: b'4.275... FAILED src/img2pdf_test.py::test_png_gray16[internal] - AssertionError: b'4.2... FAILED src/img2pdf_test.py::test_png_gray16[pikepdf] - AssertionError: b'4.24... =========== 4 failed, 334 passed, 8 skipped, 6 deselected in 50.67s ============ ``` First failure in more detail: ``` assert psnr != b"0" assert psnr != b"0 (0)" > assert psnr_re.fullmatch(psnr) is not None, psnr E AssertionError: b'4.27547e-05 (8.87677e-07)' E assert None is not None E + where None = <built-in method fullmatch of re.Pattern object at 0xffff87f3e510>(b'4.27547e-05 (8.87677e-07)') E + where <built-in method fullmatch of re.Pattern object at 0xffff87f3e510> = re.compile(b'((?:inf|(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?))(?: \\([0-9.]+\\))?').fullmatch src/img2pdf_test.py:389: AssertionError ``` cf. https://kojipkgs.fedoraproject.org//work/tasks/8776/132588776/build.log https://koji.fedoraproject.org/koji/taskinfo?taskID=132588776 NB: Those assertion previously succeeded on Rawhide (with img2pdf 0.6.0). Since the delta between img2pdf 0.6.0 and 0.6.1 isn't that big, the failures may very well be caused by changes in the dependencies, in particular ImageMagick, since rawhide is kind of bleeding edge. In that last run the environment has: ``` DEBUG util.py:461: ImageMagick aarch64 1:7.1.1.47-1.fc43 build 140.2 KiB DEBUG util.py:461: icc-profiles-openicc noarch 1.3.1-29.fc42 build 1.7 MiB DEBUG util.py:461: libpng aarch64 2:1.6.48-1.fc43 build 269.8 KiB ```
Owner
Indeed this is an imagemagick issue but upstream is aware of it: * https://github.com/ImageMagick/ImageMagick/issues/8120 * https://github.com/ImageMagick/ImageMagick/issues/8094
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#210
No description provided.