Skip to content

3 tests started to fail with ghostscript 10.06 #9224

@heirecka

Description

@heirecka

What did you do?

Updated to ghostscript 10.06, ran Pillow's tests

### What actually happened?
Three tests failed, which didn't happen with ghostscript 10.05.1
FAILED Tests/test_file_eps.py::test_1[Tests/images/eps/1.eps] - Failed: got different content
FAILED Tests/test_file_eps.py::test_1[Tests/images/eps/1_boundingbox_after_imagedata.eps] - Failed: got different content
FAILED Tests/test_file_eps.py::test_1[Tests/images/eps/1_second_imagedata.eps] - Failed: got different content

full log at the bottom below ⬇️

What are your OS, Python and Pillow versions?

  • OS: Exherbo Linux
  • Python: 3.12.11/3.13.7
  • Pillow: 11.3.0
❯ python3 -m PIL.report
--------------------------------------------------------------------
Pillow 11.3.0
Python 3.13.7 (main, Sep 17 2025, 21:36:25) [GCC 15.2.0]
--------------------------------------------------------------------
Python executable is /usr/host/bin/python3
System Python files loaded from /usr/x86_64-pc-linux-gnu
--------------------------------------------------------------------
Python Pillow modules loaded from /usr/x86_64-pc-linux-gnu/lib/python3.13/site-packages/PIL
Binary Pillow modules loaded from /usr/x86_64-pc-linux-gnu/lib/python3.13/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 11.3.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.14.1
--- LITTLECMS2 support ok, loaded 2.17
--- WEBP support ok, loaded 1.6.0
*** AVIF support not installed
--- JPEG support ok, compiled for libjpeg-turbo 3.1.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.4
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.7.1
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------

Full log of the failures:

==================================================================================== FAILURES =====================================================================================
_________________________________________________________________________ test_1[Tests/images/eps/1.eps] __________________________________________________________________________

filename = 'Tests/images/eps/1.eps'

    @pytest.mark.skipif(not HAS_GHOSTSCRIPT, reason="Ghostscript not available")
    @pytest.mark.parametrize(
        # These images have an "ImageData" descriptor.
        "filename",
        (
            "Tests/images/eps/1.eps",
            "Tests/images/eps/1_boundingbox_after_imagedata.eps",
            "Tests/images/eps/1_second_imagedata.eps",
        ),
    )
    def test_1(filename: str) -> None:
        with Image.open(filename) as im:
>           assert_image_equal_tofile(im, "Tests/images/eps/1.bmp")

Tests/test_file_eps.py:277: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Tests/helper.py:107: in assert_image_equal_tofile
    assert_image_equal(a, img, msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

a = <PIL.EpsImagePlugin.EpsImageFile image mode=1 size=100x67 at 0x736DCBA6EED0>, b = <PIL.BmpImagePlugin.BmpImageFile image mode=1 size=100x67 at 0x736DCBA6F6B0>, msg = None

    def assert_image_equal(a: Image.Image, b: Image.Image, msg: str | None = None) -> None:
        assert a.mode == b.mode, msg or f"got mode {repr(a.mode)}, expected {repr(b.mode)}"
        assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
        if a.tobytes() != b.tobytes():
            try:
                url = upload(a, b)
                if url:
                    logger.error("URL for test images: %s", url)
            except Exception:
                pass
    
>           pytest.fail(msg or "got different content")
E           Failed: got different content

Tests/helper.py:95: Failed
___________________________________________________________ test_1[Tests/images/eps/1_boundingbox_after_imagedata.eps] ____________________________________________________________

filename = 'Tests/images/eps/1_boundingbox_after_imagedata.eps'

    @pytest.mark.skipif(not HAS_GHOSTSCRIPT, reason="Ghostscript not available")
    @pytest.mark.parametrize(
        # These images have an "ImageData" descriptor.
        "filename",
        (
            "Tests/images/eps/1.eps",
            "Tests/images/eps/1_boundingbox_after_imagedata.eps",
            "Tests/images/eps/1_second_imagedata.eps",
        ),
    )
    def test_1(filename: str) -> None:
        with Image.open(filename) as im:
>           assert_image_equal_tofile(im, "Tests/images/eps/1.bmp")

Tests/test_file_eps.py:277: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Tests/helper.py:107: in assert_image_equal_tofile
    assert_image_equal(a, img, msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

a = <PIL.EpsImagePlugin.EpsImageFile image mode=1 size=100x67 at 0x736D541011C0>, b = <PIL.BmpImagePlugin.BmpImageFile image mode=1 size=100x67 at 0x736D54100920>, msg = None

    def assert_image_equal(a: Image.Image, b: Image.Image, msg: str | None = None) -> None:
        assert a.mode == b.mode, msg or f"got mode {repr(a.mode)}, expected {repr(b.mode)}"
        assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
        if a.tobytes() != b.tobytes():
            try:
                url = upload(a, b)
                if url:
                    logger.error("URL for test images: %s", url)
            except Exception:
                pass
    
>           pytest.fail(msg or "got different content")
E           Failed: got different content

Tests/helper.py:95: Failed
_________________________________________________________________ test_1[Tests/images/eps/1_second_imagedata.eps] _________________________________________________________________

filename = 'Tests/images/eps/1_second_imagedata.eps'

    @pytest.mark.skipif(not HAS_GHOSTSCRIPT, reason="Ghostscript not available")
    @pytest.mark.parametrize(
        # These images have an "ImageData" descriptor.
        "filename",
        (
            "Tests/images/eps/1.eps",
            "Tests/images/eps/1_boundingbox_after_imagedata.eps",
            "Tests/images/eps/1_second_imagedata.eps",
        ),
    )
    def test_1(filename: str) -> None:
        with Image.open(filename) as im:
>           assert_image_equal_tofile(im, "Tests/images/eps/1.bmp")

Tests/test_file_eps.py:277: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Tests/helper.py:107: in assert_image_equal_tofile
    assert_image_equal(a, img, msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

a = <PIL.EpsImagePlugin.EpsImageFile image mode=1 size=100x67 at 0x736D54100B00>, b = <PIL.BmpImagePlugin.BmpImageFile image mode=1 size=100x67 at 0x736D54100800>, msg = None

    def assert_image_equal(a: Image.Image, b: Image.Image, msg: str | None = None) -> None:
        assert a.mode == b.mode, msg or f"got mode {repr(a.mode)}, expected {repr(b.mode)}"
        assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
        if a.tobytes() != b.tobytes():
            try:
                url = upload(a, b)
                if url:
                    logger.error("URL for test images: %s", url)
            except Exception:
                pass
    
>           pytest.fail(msg or "got different content")
E           Failed: got different content

Tests/helper.py:95: Failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions