def test_group_slice(self):

        # A very basic slice test
        with fits.open(self.data('random_groups.fits')) as hdul:
            g = hdul[0].data[0]
            s = g[2:4]
            assert len(s) == 2
            assert s[0] == g[2]
            assert s[-1] == g[-3]
            s = g[::-1]
            assert len(s) == 6
            assert (s[0] == g[-1]).all()
            assert s[-1] == g[0]
            s = g[::2]
            assert len(s) == 3
            assert s[0] == g[0]
            assert s[1] == g[2]
            assert s[2] == g[4]
Tests basic slicing a single group record.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_groups.py/TestGroupsFunctions.test_group_slice