This pull request fixes the tests for Python 3. The file handler in the IndexTable object is not serializable in Python 3, so __copy__ and __deepcopy__ must be overriden to be able to copy them.
This also fixes dangling file descriptors, any opened file must be closed. stdin is kept opened so that it can be reused later on. Python 3 issues a warning when such a thing happen, Python 2 does not.
This pull request fixes the tests for Python 3. The file handler in the IndexTable object is not serializable in Python 3, so
__copy__
and__deepcopy__
must be overriden to be able to copy them.This also fixes dangling file descriptors, any opened file must be closed.
stdin
is kept opened so that it can be reused later on. Python 3 issues a warning when such a thing happen, Python 2 does not.