5
5
import numpy as np
6
6
import pytest
7
7
8
- from pandas ._config import using_string_dtype
9
-
10
- from pandas .compat import HAS_PYARROW
11
-
12
8
from pandas .core .dtypes .common import is_string_dtype
13
9
14
10
import pandas as pd
@@ -134,12 +130,6 @@ class BaseArithmeticOpsTests(BaseOpsUtil):
134
130
series_array_exc : type [Exception ] | None = TypeError
135
131
divmod_exc : type [Exception ] | None = TypeError
136
132
137
- # TODO(infer_string) need to remove import of pyarrow
138
- @pytest .mark .xfail (
139
- using_string_dtype () and not HAS_PYARROW ,
140
- reason = "TODO(infer_string)" ,
141
- strict = False ,
142
- )
143
133
def test_arith_series_with_scalar (self , data , all_arithmetic_operators ):
144
134
# series & scalar
145
135
if all_arithmetic_operators == "__rmod__" and is_string_dtype (data .dtype ):
@@ -149,11 +139,6 @@ def test_arith_series_with_scalar(self, data, all_arithmetic_operators):
149
139
ser = pd .Series (data )
150
140
self .check_opname (ser , op_name , ser .iloc [0 ])
151
141
152
- @pytest .mark .xfail (
153
- using_string_dtype () and not HAS_PYARROW ,
154
- reason = "TODO(infer_string)" ,
155
- strict = False ,
156
- )
157
142
def test_arith_frame_with_scalar (self , data , all_arithmetic_operators ):
158
143
# frame & scalar
159
144
if all_arithmetic_operators == "__rmod__" and is_string_dtype (data .dtype ):
@@ -163,22 +148,12 @@ def test_arith_frame_with_scalar(self, data, all_arithmetic_operators):
163
148
df = pd .DataFrame ({"A" : data })
164
149
self .check_opname (df , op_name , data [0 ])
165
150
166
- @pytest .mark .xfail (
167
- using_string_dtype () and not HAS_PYARROW ,
168
- reason = "TODO(infer_string)" ,
169
- strict = False ,
170
- )
171
151
def test_arith_series_with_array (self , data , all_arithmetic_operators ):
172
152
# ndarray & other series
173
153
op_name = all_arithmetic_operators
174
154
ser = pd .Series (data )
175
155
self .check_opname (ser , op_name , pd .Series ([ser .iloc [0 ]] * len (ser )))
176
156
177
- @pytest .mark .xfail (
178
- using_string_dtype () and not HAS_PYARROW ,
179
- reason = "TODO(infer_string)" ,
180
- strict = False ,
181
- )
182
157
def test_divmod (self , data ):
183
158
ser = pd .Series (data )
184
159
self ._check_divmod_op (ser , divmod , 1 )
@@ -194,7 +169,6 @@ def test_divmod_series_array(self, data, data_for_twos):
194
169
other = pd .Series (other )
195
170
self ._check_divmod_op (other , ops .rdivmod , ser )
196
171
197
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" , strict = False )
198
172
def test_add_series_with_extension_array (self , data ):
199
173
# Check adding an ExtensionArray to a Series of the same dtype matches
200
174
# the behavior of adding the arrays directly and then wrapping in a
0 commit comments