@@ -175,20 +175,30 @@ def test_take_series(self, data):
175
175
# ValueError: PandasArray must be 1-dimensional.
176
176
super ().test_take_series (data )
177
177
178
- def test_loc_iloc_frame_single_dtype (self , data ):
178
+ def test_loc_iloc_frame_single_dtype (self , data , request ):
179
179
npdtype = data .dtype .numpy_dtype
180
180
if npdtype == object or npdtype == np .float64 :
181
181
# GH#33125
182
- pytest .xfail (reason = "GH#33125 astype doesn't recognize data.dtype" )
182
+ mark = pytest .mark .xfail (
183
+ reason = "GH#33125 astype doesn't recognize data.dtype"
184
+ )
185
+ request .node .add_marker (mark )
183
186
super ().test_loc_iloc_frame_single_dtype (data )
184
187
185
188
186
189
class TestGroupby (BaseNumPyTests , base .BaseGroupbyTests ):
187
190
@skip_nested
188
- def test_groupby_extension_apply (self , data_for_grouping , groupby_apply_op ):
191
+ def test_groupby_extension_apply (
192
+ self , data_for_grouping , groupby_apply_op , request
193
+ ):
189
194
# ValueError: Names should be list-like for a MultiIndex
190
- if data_for_grouping .dtype .numpy_dtype == np .float64 :
191
- pytest .xfail (reason = "GH#33125 astype doesn't recognize data.dtype" )
195
+ a = "a"
196
+ is_identity = groupby_apply_op (a ) is a
197
+ if data_for_grouping .dtype .numpy_dtype == np .float64 and is_identity :
198
+ mark = pytest .mark .xfail (
199
+ reason = "GH#33125 astype doesn't recognize data.dtype"
200
+ )
201
+ request .node .add_marker (mark )
192
202
super ().test_groupby_extension_apply (data_for_grouping , groupby_apply_op )
193
203
194
204
0 commit comments