'Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/113
Tests creating a table from a recarray containing numpy.bool columns.'

def test_table_from_bool_fields(self):

    array = np.rec.array([(True, False), (False, True)], formats='|b1,|b1')
    thdu = fits.BinTableHDU.from_columns(array)
    assert (thdu.columns.formats == ['L', 'L'])
    assert comparerecords(thdu.data, array)
    thdu.writeto(self.temp('table.fits'))
    data = fits.getdata(self.temp('table.fits'), ext=1)
    assert (thdu.columns.formats == ['L', 'L'])
    assert comparerecords(data, array)
