'Tests loading a table dump with no supplied coldefs or header, so that
the table format has to be guessed at.  There is of course no exact
science to this; the table that\'s produced simply uses sensible guesses
for that format.  Ideally this should never have to be used.'

def test_load_guess_format(self):

    a0 = np.array([False, True, False], dtype=np.bool)
    c0 = fits.Column(name='c0', format='L', array=a0)
    a2 = np.array([1, 128, 255], dtype=np.uint8)
    c2 = fits.Column(name='c2', format='B', array=a2)
    a3 = np.array([(-30000), 1, 256], dtype=np.int16)
    c3 = fits.Column(name='c3', format='I', array=a3)
    a4 = np.array([(-123123123), 1234, 123123123], dtype=np.int32)
    c4 = fits.Column(name='c4', format='J', array=a4)
    a5 = np.array(['a', 'abc', 'ab'])
    c5 = fits.Column(name='c5', format='A3', array=a5)
    a6 = np.array([1.1, 2.2, 3.3], dtype=np.float64)
    c6 = fits.Column(name='c6', format='D', array=a6)
    a7 = np.array([(1.1 + 2.2j), (3.3 + 4.4j), (5.5 + 6.6j)], dtype=np.complex128)
    c7 = fits.Column(name='c7', format='M', array=a7)
    a8 = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=np.int32)
    c8 = fits.Column(name='c8', format='PJ()', array=a8)
    tbhdu = fits.BinTableHDU.from_columns([c0, c2, c3, c4, c5, c6, c7, c8])
    datafile = self.temp('data.txt')
    tbhdu.dump(datafile)
    new_tbhdu = fits.BinTableHDU.load(datafile)
    assert comparerecords(tbhdu.data, new_tbhdu.data)
