Roundup Robot added the comment:
New changeset e2d013e90e88 by Ned Deily in branch '2.7':
Issue #19990: Install test/imghdrdata.
http://hg.python.org/cpython/rev/e2d013e90e88
New changeset 5fbe155e62b0 by Ned Deily in branch '3.3':
Issue #19990: Install test/imghdrdata.
Claudiu.Popa added the comment:
Hello! Here's the new version of the patch, with tests proposed by Serhiy.
--
Added file: http://bugs.python.org/file33731/test_imghdr_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
Serhiy Storchaka added the comment:
Looks as you forgot to include some test files in the patch.
And these files are too large. Much smaller images would be enough. For example
you can use python.org icon: http://www.python.org/favicon.ico.
--
___
Claudiu.Popa added the comment:
Here's a smaller patch. Serhiy, what test files are missing?
--
Added file: http://bugs.python.org/file33733/test_imghdr_4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
Serhiy Storchaka added the comment:
Last patch contains only pbm and xbm test files, while test_imghdr expects 11
different image files: png, gif, bmp, etc.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
Claudiu.Popa added the comment:
Ah, I understand now. Maybe it is related to the fact that I used `hg diff
--git`? Doing the following works for me, both Windows and FreeBsd and all the
files are present afterwards:
1. hg diff --git patch
2. hg import --no-commit patch
Although I'm not sure
Serhiy Storchaka added the comment:
Oh, yes, my bad. I used the patch utility. Sorry.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
___
Roundup Robot added the comment:
New changeset b28909d501c0 by Serhiy Storchaka in branch '2.7':
Issue #19990: Added tests for the imghdr module.
http://hg.python.org/cpython/rev/b28909d501c0
New changeset fde9e9832749 by Serhiy Storchaka in branch '3.3':
Issue #19990: Added tests for the
Serhiy Storchaka added the comment:
Thank you Claudiu.
I have reorganized tests somewhat and added new test for file position.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Serhiy Storchaka added the comment:
In general the patch LGTM, but additional tests can be added.
Needed various tests for imghdr.what() arguments:
* First argument is bytes, int or None.
* First argument is a name of non-existent file.
* First argument is text stream.
* First argument is
Claudiu.Popa added the comment:
Hello. Here's a new version which uses real image files as testing data.
--
Added file: http://bugs.python.org/file33552/test_imghdr_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
Martin Vignali added the comment:
I made a simple exr file with the lib Exr (it's a half float ZIP16 RGBA file),
in order to add real exr file to the unit test.
When use with the patch i made here http://bugs.python.org/issue20295 ,
this sample file return 'exr'.
Sorry, i don't know how to
New submission from Claudiu.Popa:
Hello! The following patch adds unit tests for the previously untested `imghdr`
module.
--
components: Tests
files: test_imghdr.patch
keywords: patch
messages: 206262
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Add
Vajrasky Kok added the comment:
Beside my review, I think we need one more test that tests the invalid image
file, for example file with header b'cutecat'.
--
nosy: +vajrasky
___
Python tracker rep...@bugs.python.org
Claudiu.Popa added the comment:
Thanks for the review, Vajrasky! Here's the updated version.
--
Added file: http://bugs.python.org/file33157/test_imghdr.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19990
15 matches
Mail list logo