Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.2.0] flaky test/test_art_resize.py #5537

Open
Kangie opened this issue Dec 6, 2024 · 1 comment
Open

[2.2.0] flaky test/test_art_resize.py #5537

Kangie opened this issue Dec 6, 2024 · 1 comment

Comments

@Kangie
Copy link

Kangie commented Dec 6, 2024

[gw11] linux -- Python 3.13.1 /var/tmp/portage/media-sound/beets-2.2.0/work/beets-2.2.0_python3.13/install/usr/bin/python3.13

self = <test.test_art_resize.ArtResizerFileSizeTest testMethod=test_pil_file_deinterlace>

    @unittest.skipUnless(PILBackend.available(), "PIL not available")
    def test_pil_file_deinterlace(self):
        """Test PIL deinterlace function.
    
        Check if the `PILBackend.deinterlace()` function returns images
        that are non-progressive
        """
        path = PILBackend().deinterlace(self.IMG_225x225)
        from PIL import Image
    
        with Image.open(path) as img:
>           assert "progression" not in img.info
E           AssertionError: assert 'progression' not in {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1), ...}
E            +  where {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1), ...} = <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=225x225 at 0x7F11091A2210>.info

Image      = <module 'PIL.Image' from '/usr/lib/python3.13/site-packages/PIL/Image.py'>
img        = <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=225x225 at 0x7F11091A2210>
path       = b'/var/tmp/portage/media-sound/beets-2.2.0/work/beets-2.2.0/test/rsrc/abbey.jpg'
self       = <test.test_art_resize.ArtResizerFileSizeTest testMethod=test_pil_file_deinterlace>

test/test_art_resize.py:127: AssertionError
  • OS: Gentoo Linux
  • Python version: 3.13
  • beets version: 2.2.0
  • Turning off plugins made problem go away (yes/no): N/A
  • Pillow: dev-python/pillow-11.0.0-r1::gentoo

This test does not run in CI on Ubuntu, so I'm unsure if this is a downstream environment issue or if something is broken in the package:

SKIPPED [1] test/test_art_resize.py:116: PIL not available
SKIPPED [1] test/test_art_resize.py:106: PIL not available

I'm going to skip the test downstream for now but we probably need to get CI working.

@Kangie
Copy link
Author

Kangie commented Dec 6, 2024

To add insult to injury this works when run standalone, and now with all of the other tests. It may just be a bit flaky

[gw31] [1/1] PASSED test/test_art_resize.py::ArtResizerFileSizeTest::test_pil_file_deinterlace 

Can we get the CI updated to include / use PIL regardless?

@Kangie Kangie changed the title [2.2.0] failing test/test_art_resize.py [2.2.0] flaky test/test_art_resize.py Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant