@@ -61,10 +61,7 @@ def _check_expected_dtype(self, obj, label):
61
61
considering not-supported dtypes
62
62
"""
63
63
if isinstance (obj , Index ):
64
- if label == "bool" :
65
- assert obj .dtype == "object"
66
- else :
67
- assert obj .dtype == label
64
+ assert obj .dtype == label
68
65
elif isinstance (obj , Series ):
69
66
if label .startswith ("period" ):
70
67
assert obj .dtype == "Period[M]"
@@ -185,7 +182,7 @@ def test_concatlike_same_dtypes(self, item):
185
182
with pytest .raises (TypeError , match = msg ):
186
183
pd .concat ([Series (vals1 ), Series (vals2 ), vals3 ])
187
184
188
- def test_concatlike_dtypes_coercion (self , item , item2 ):
185
+ def test_concatlike_dtypes_coercion (self , item , item2 , request ):
189
186
# GH 13660
190
187
typ1 , vals1 = item
191
188
typ2 , vals2 = item2
@@ -209,8 +206,12 @@ def test_concatlike_dtypes_coercion(self, item, item2):
209
206
# series coerces to numeric based on numpy rule
210
207
# index doesn't because bool is object dtype
211
208
exp_series_dtype = typ2
209
+ mark = pytest .mark .xfail (reason = "GH#39187 casting to object" )
210
+ request .node .add_marker (mark )
212
211
elif typ2 == "bool" and typ1 in ("int64" , "float64" ):
213
212
exp_series_dtype = typ1
213
+ mark = pytest .mark .xfail (reason = "GH#39187 casting to object" )
214
+ request .node .add_marker (mark )
214
215
elif (
215
216
typ1 == "datetime64[ns, US/Eastern]"
216
217
or typ2 == "datetime64[ns, US/Eastern]"
0 commit comments