def test_bool_column(tmpdir):
 arr = np.ones(5, dtype=bool)
 (arr[::2] == np.False_)
 t = Table([arr])
 t.write(str(tmpdir.join('test.fits')), overwrite=True)
 with fits.open(str(tmpdir.join('test.fits'))) as hdul:
  assert (hdul[1].data['col0'].dtype == np.dtype('bool'))
  assert np.all((hdul[1].data['col0'] == arr))

def test_bool_column ( tmpdir ) : arr = np . ones ( 5 , dtype = bool ) ( arr [ : : 2 ] == np . False_ ) t = Table ( [ arr ] ) t . write ( str ( tmpdir . join ( 'test.fits' ) ) , overwrite = True ) with fits . open ( str ( tmpdir . join ( 'test.fits' ) ) ) as hdul : assert ( hdul [ 1 ] . data [ 'col0' ] . dtype == np . dtype ( 'bool' ) ) assert np . all ( ( hdul [ 1 ] . data [ 'col0' ] == arr ) )
regression test for URL ensures that table columns of bools are properly written to a fits table .