[issue24259] tar.extractall() does not recognize unexpected EOF

Martin Panter report at bugs.python.org
Sun Jun 21 10:55:37 CEST 2015


Martin Panter added the comment:

>From the current documentation and limited experience with the module, ReadError (or a subclass) sounds best. I would only expect OSError only for OS-level things, like file not found, disk error, etc.

The patches look good. One last suggestion is to use assertRaisesRegex, to be sure that you are getting exactly the exception you expect. Too many times I have found tests in the test suite that were completely broken, but happened to pass because the error happened to match the exception being tested.

----------

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


More information about the Python-bugs-list mailing list