def METHOD_NAME(self):
    z = np.ones(10)
    z.flags.writeable = False # flip write bit
    tests = []
    expect = "ufunc 'sin' called with an explicit output that is read-only"
    tests.append((jit(nopython=True), TypingError, expect))
    tests.append((jit(forceobj=True), ValueError,
                  "output array is read-only"))
    for dec, exc, msg in tests:
        def test(x):
            a = np.ones(x.shape, x.dtype) # do not copy RO attribute from x
            np.sin(a, x)
        with self.assertRaises(exc) as raises:
            dec(test)(z)
        self.assertIn(msg, str(raises.exception))