def _check_op(self, s, op, other, op_name, exc=NotImplementedError):
    if (exc is None):
        result = op(s, other)
        expected = s.combine(other, op)
        if hasattr(expected.dtype, 'arrow_dtype'):
            arrow_dtype = expected.dtype.arrow_dtype
            if pa.types.is_integer(arrow_dtype):
                other_is_np_int64 = (isinstance(other, pd.Series) and isinstance(other.values, np.ndarray) and (other.dtype.char in ('q', 'l')))
                if (pa.types.is_integer(arrow_dtype) and pa.types.is_integer(s.dtype.arrow_dtype) and (not other_is_np_int64)):
                    expected = expected.astype(s.dtype)
        self.assert_series_equal(result, expected)
    else:
        with pytest.raises(exc):
            op(s, other)
def _check_op(self, s, op, other, op_name, exc=NotImplementedError):
    if (exc is None):
        result = op(s, other)
        expected = s.combine(other, op)
        if hasattr(expected.dtype, 'arrow_dtype'):
            arrow_dtype = expected.dtype.arrow_dtype
            if pa.types.is_integer(arrow_dtype):
                other_is_np_int64 = (isinstance(other, pd.Series) and isinstance(other.values, np.ndarray) and (other.dtype.char in ('q', 'l')))
                if (pa.types.is_integer(arrow_dtype) and pa.types.is_integer(s.dtype.arrow_dtype) and (not other_is_np_int64)):
                    expected = expected.astype(s.dtype)
        self.assert_series_equal(result, expected)
    else:
        with pytest.raises(exc):
            op(s, other)