'Simple test for writing a trivial header and some data to a file
with the `writeto()` convenience function.'

def test_writeto(self):

    data = np.zeros((100, 100))
    header = fits.Header()
    fits.writeto(self.temp('array.fits'), data, header=header, overwrite=True)
    hdul = fits.open(self.temp('array.fits'))
    assert (len(hdul) == 1)
    assert (data == hdul[0].data).all()
