You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test failure: TestFilePng.test_save_p_transparent_black #3243
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.
If @DerDakon is saying that test_save_p_transparent_black was fixed by something between 5.1.0 and 6.2.1, then this looks ready to be closed (or you can wait a few days and test when Pillow 9.0 is released, due on January 2).
Activity
radarhere commentedon Jul 19, 2018
If it helps, I was able to pass test_file_png tests in 64-bit Gentoo in Python 2.7.
jiangtao9999 commentedon Dec 30, 2019
Mips64el (little endian) is same.
I am compiling opensuse 15.1 to mips64el r2 .
python-Pillow version is 5.0.0 .
Maybe, is it a python bug ?
ctype modules? I remember that python is check failed at ctype.
radarhere commentedon Mar 14, 2020
Interestingly, big endian is now part of our CI jobs (#4336), and this test passes.
DerDakon commentedon Mar 14, 2020
This is what I get with 7.0.0 on Gentoo Sparc:
thesamesam commentedon Jul 14, 2020
Failures on ppc64 (big endian), Gentoo:
DerDakon commentedon Sep 10, 2020
Updated error list for Pillow 7.2.0 on Gentoo/Sparc (tl;dr: the same as on ppc64 above):
platform linux -- Python 3.7.8, pytest-4.6.11, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python3.7
DerDakon commentedon Nov 24, 2020
I get exactly the same test failures on hppa with 7.2.0 as on sparc, with the same value differences.
radarhere commentedon Dec 28, 2021
@DerDakon why isn't the
test_save_p_transparent_blackfailure mentioned in #3927?DerDakon commentedon Dec 28, 2021
Because it magically passes there. Found it passing in the logs of 6.2.1, 6.2.2, 7.2.0, and 8.0.1.
radarhere commentedon Dec 28, 2021
I expect the failures listed in #3243 (comment), #3243 (comment) and #3243 (comment) to now be passing on main (thanks to #5364, #5901 and #4457), leaving just
test_save_p_transparent_black.radarhere commentedon Dec 28, 2021
If @DerDakon is saying that
test_save_p_transparent_blackwas fixed by something between 5.1.0 and 6.2.1, then this looks ready to be closed (or you can wait a few days and test when Pillow 9.0 is released, due on January 2).radarhere commentedon Jan 1, 2022
If the test_save_p_transparent_black problem is purely a big endian issue, then I'm unable to reproduce it with Pillow 5.1.0 - radarhere/docker-images@50f2964 passes in https://github.com/radarhere/docker-images/runs/4679158046
radarhere commentedon Jan 10, 2022
Pillow 9.0 has been released. So everything except for
test_save_p_transparent_blackshould now be passing.DerDakon commentedon Jan 16, 2022
On hppa all tests pass. On sparc I had only one unrelated error:
Can be hard to meet such short timing requirements if it involves disk I/O, e.g. for start of external programs.