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 (not isinstance(expected.dtype, FletcherBaseDtype)):
            expected = pd.Series(type(s.values)(expected.values))
        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 (not isinstance(expected.dtype, FletcherBaseDtype)):
            expected = pd.Series(type(s.values)(expected.values))
        self.assert_series_equal(result, expected)
    else:
        with pytest.raises(exc):
            op(s, other)