'1d to 1d slice assignment'

def test_1d_slicing_set(self, flags=enable_pyobj_flags):

    pyfunc = slicing_1d_usecase_set
    dest_type = types.Array(types.int32, 1, 'C')
    src_type = types.Array(types.int16, 1, 'A')
    argtys = (dest_type, src_type, types.int32, types.int32, types.int32)
    cr = compile_isolated(pyfunc, argtys, flags=flags)
    cfunc = cr.entry_point
    N = 10
    arg = (np.arange(N, dtype='i2') + 40)
    bounds = [0, 2, (N - 2), N, (N + 1), (N + 3), (-2), ((- N) + 2), (- N), ((- N) - 1), ((- N) - 3)]
    def make_dest():
        return np.zeros_like(arg, dtype='i4')
    for (start, stop) in itertools.product(bounds, bounds):
        for step in (1, 2, (-1), (-2)):
            args = (start, stop, step)
            index = slice(*args)
            pyleft = pyfunc(make_dest(), arg[index], *args)
            cleft = cfunc(make_dest(), arg[index], *args)
            self.assertPreciseEqual(pyleft, cleft)
    with self.assertRaises(ValueError):
        cfunc(np.zeros_like(arg), arg, 0, 0, 1)
