Slight reorg of tests that will be useful going forward.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2430 ed100bfc-0583-0410-97f2-c26b58777a21
Fixes #8 from https://github.com/spacetelescope/PyFITS/issues/8 by ensuring that checksums are added on HDUs that did not already have them.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2431 ed100bfc-0583-0410-97f2-c26b58777a21
Fixed an issue I caught while updating the checksum tests, though it is not specifically related to checksums.  The issue is that if an image contains pseudo-unsigned integers, merely opening the file and then writing a copy of it will remove all the pseudo-unsigned scaling unexpectedly and clearly undesiredly.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2432 ed100bfc-0583-0410-97f2-c26b58777a21
Changelog entry for the fix in a2cdcef

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2433 ed100bfc-0583-0410-97f2-c26b58777a21
Improved several of the checksum tests to check that the checksums being written are *actually* correct (previously we used PyFITS itself to also verify the checksums, but this ensures that the checksums are also validated against CFITSIO (using precomputed values)).  Also fixed an issue found in the process where checksums were needlessly deleted from a header when validating them.  Some of the tests are still partially disabled due to bugs in checksum computation for binary tables and for compressed images, which still need to be addressed.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2434 ed100bfc-0583-0410-97f2-c26b58777a21
Fixed two bugs:

 1. Writing a binary table HDU with compression left the original HDU's
    data byteswapped (and hence mildly "corrupted").

 2. Compressed image HDUs did not correctly compute the ZHECKSUM and
    ZDATASUM header keywords for the checksums of the original image.

This involved a long-needed breaking up of
BinTableHDU._binary_table_byte_swap into the actual byte swapping
operations, and the parts that wrote to a file.  Now that method just
does byte-swapping, and the details of writing the raw data to a file
object (including the heap) are handled in
BinTableHDU._writedata_internal where it belongs.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2435 ed100bfc-0583-0410-97f2-c26b58777a21
Some Python 3 specific fixes, the need for which were brought to my attention by the updated tests in a565ebf26610e9eecd0a2603ac428f056ed7afbd

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2436 ed100bfc-0583-0410-97f2-c26b58777a21
Ack, removed duplicate changelog entry