'Regression test for https://github.com/astropy/astropy/issues/3730 and
for https://github.com/spacetelescope/PyFITS/issues/102'

def test_random_groups_data_update(self):

    self.copy_file('random_groups.fits')
    with fits.open(self.temp('random_groups.fits'), mode='update') as h:
        h[0].data['UU'] = 0.42
    with fits.open(self.temp('random_groups.fits'), mode='update') as h:
        assert np.all((h[0].data['UU'] == 0.42))
