Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test failure: TestFilePng.test_save_p_transparent_black #3243

@DerDakon

Description

@DerDakon

When I run the testsuite on my Gentoo HPPA (big endian!) machine, I get this:

platform linux2 -- Python 2.7.14, pytest-3.2.2, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python2.7
cachedir: .cache
rootdir: /var/tmp/portage/dev-python/pillow-5.2.0/work/Pillow-5.2.0, inifile: setup.cfg
plugins: expect-1.1.0, cov-2.3.1, hypothesis-3.6.0
collecting ... collected 2352 items

[…]
self = <test_file_png.TestFilePng testMethod=test_save_p_transparent_black>

    def test_save_p_transparent_black(self):
        # check if solid black image with full transparency
        # is supported (check for #1838)
        im = Image.new("RGBA", (10, 10), (0, 0, 0, 0))
        self.assertEqual(im.getcolors(), [(100, (0, 0, 0, 0))])
    
        im = im.convert("P")
        test_file = self.tempfile("temp.png")
        im.save(test_file)
    
        # check if saved image contains same transparency
        im = Image.open(test_file)
>       self.assertEqual(len(im.info["transparency"]), 256)
E       TypeError: object of type 'int' has no len()

This can be traced back to at least 3.4.2, as reported in this downstream bug. After fixing the SIGBUS errors on 4.3.0 I had the same problem on sparc, so it may be a big endian issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions