def METHOD_NAME(self):
    with np.errstate(all='raise', under='ignore'):
        a = -np.arange(3)
        # This should work
        with np.errstate(invalid='ignore'):
            np.sqrt(a)
        # While this should fail!
        with assert_raises(FloatingPointError):
            np.sqrt(a)