Closed
Labels
Milestone
Description
I know we've just gone through a huge test update, but I think we should change the test image a bit more. (or at least, test with odd image sizes)
We're currently testing with a 128x128 image. There are at least 2 classes of (potential) bug that aren't hit by this:
- Always getting the x,y order right, and checking the right bounds. If they're the same, we're never going to notice. If we're doing it backwards and the sizes are different, something should error.
- There are some line size and padding code bits that are tickled with non aligned bits_samples_pixels.
I think it might be worth cropping the output of hopper to something like (121,127) and see what fails.
It's likely that a lot of the comparisons to the various hopper.* images would fail. It's probably not worth a changes that invalidates all of them.
Thoughts?
Activity
hugovk commentedon Oct 7, 2014
Yes, can do.
Can you clarify that?
wiredfool commentedon Oct 7, 2014
Clarification -- I'd like to make a quick/small change to the output of hopper() to potentially tickle some bugs. I don't really want to get into redoing all the images again, nor touching all the tests.
hugovk commentedon Oct 7, 2014
There we go:
https://travis-ci.org/hugovk/Pillow/builds/37319230
wiredfool commentedon Oct 7, 2014
Interesting. There are definitely a few that look suspicious, like test_trns_p, test_extrema, and TestImageSpider.test_save, along with a bunch that are clearly just more fragile checks for the exact pixels in the image.
hugovk commentedon Nov 4, 2014
This one is due to an assumption that the test image is square:
Can be made more robust by changing:
To:
And possibly by changing:
To:
Worth changing either of those?
hugovk commentedon Nov 4, 2014
A quick look into
TestImageConvert.test_trns_p:This can be minimally reproduced (using the original
hopper()) with:So after
crop()(crop size doesn't matter)im.paletteis None.im.convert('L')succeeds ifim.info['transparency'] = 0is commented out, otherwise the sameTypeErroroccurs.aclark4life commentedon Mar 26, 2015
Status? Looks like maybe this was merged. Please reopen if still an issue.
hugovk commentedon Mar 26, 2015
Re-opening. This was some testing that identified a few things that still need addressing.
aclark4life commentedon Mar 26, 2015
Roger that, thanks
Make tests more robust re: python-pillow#947 (comment)
hugovk commentedon Oct 5, 2015
I've created PR #1469 with the suggestions above, but let's close this whether that PR makes it or not.