def METHOD_NAME(self):
    # check that len(writable_args) <= nin
    with self.assertRaises(ValueError):
        guvectorize(['void(f8[:], f8[:])'], '(t),()', nopython=True,
                    writable_args=(0, 1, 2, 5))(py_replace_2nd)
    # check that all values in writable_args are between 0 and nin
    with self.assertRaises(ValueError):
        guvectorize(['void(f8[:], f8[:])'], '(t),()',
                    nopython=True, writable_args=(5,))(py_replace_2nd)
    with self.assertRaises(ValueError):
        guvectorize(['void(f8[:], f8[:])'], '(t),()',
                    nopython=True, writable_args=(-1,))(py_replace_2nd)
    # check that exception is raised when passing non-existing argument name
    with self.assertRaises(RuntimeError):
        guvectorize(['void(f8[:], f8[:])'], '(t),()',
                    nopython=True, writable_args=('z_t',))(py_replace_2nd)
    # writable_args are not supported for target='cuda'
    with self.assertRaises(TypeError):
        guvectorize(['void(f8[:], f8[:])'], '(t),()',
                    nopython=True, writable_args=(0,),
                    target='cuda')(py_replace_2nd)