'Tests basic slicing a single group record.'

def test_group_slice(self):

    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])
