'Regression test related to
https://github.com/astropy/astropy/issues/2794#issuecomment-55441539
Demonstrates that writing an HDU containing a discontiguous Numpy array
should work properly.'

@pytest.mark.skipif('not    HAVE_STRINGIO')
def test_write_stringio_discontiguous(self):

    data = np.arange(100)[::3]
    hdu = fits.PrimaryHDU(data=data)
    fileobj = StringIO.StringIO()
    hdu.writeto(fileobj)
    fileobj.seek(0)
    with fits.open(fileobj) as h:
        assert np.all((h[0].data == data))
