'A simple test to ensure that slicing GroupData returns a new, smaller
GroupData object, as is the case with a normal FITS_rec.  This is a
regression test for an as-of-yet unreported issue where slicing
GroupData returned a single Group record.'

def test_groupdata_slice(self):

    with fits.open(self.data('random_groups.fits')) as hdul:
        s = hdul[0].data[1:]
        assert isinstance(s, fits.GroupData)
        assert (len(s) == 2)
        assert (hdul[0].data.parnames == s.parnames)
