[issue19990] Add unittests for imghdr module

Serhiy Storchaka report at bugs.python.org
Tue Jan 21 17:44:48 CET 2014


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 output stream.
* First argument is closed stream.
* First argument is non-seekable stream.
* Second argument is bytearray.
* Second argument is str.
* Second argument is None.

Try to insert test function which handles one of already supported format at the front of imghdr.test.

----------
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 2.7, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19990>
_______________________________________


More information about the Python-bugs-list mailing list