3
3
import numpy as np
4
4
import pytest
5
5
6
- from pandas ._config import using_string_dtype
7
-
8
6
import pandas as pd
9
7
import pandas ._testing as tm
10
8
11
9
12
10
class TestConvertDtypes :
13
- # TODO convert_dtypes should not use NaN variant of string dtype, but always NA
14
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
15
11
@pytest .mark .parametrize (
16
12
"convert_integer, expected" , [(False , np .dtype ("int32" )), (True , "Int32" )]
17
13
)
18
- def test_convert_dtypes (
19
- self , convert_integer , expected , string_storage , using_infer_string
20
- ):
14
+ def test_convert_dtypes (self , convert_integer , expected , string_storage ):
21
15
# Specific types are tested in tests/series/test_dtypes.py
22
16
# Just check that it works for DataFrame here
23
17
df = pd .DataFrame (
@@ -182,7 +176,6 @@ def test_convert_dtypes_pyarrow_timestamp(self):
182
176
result = expected .convert_dtypes (dtype_backend = "pyarrow" )
183
177
tm .assert_series_equal (result , expected )
184
178
185
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
186
179
def test_convert_dtypes_avoid_block_splitting (self ):
187
180
# GH#55341
188
181
df = pd .DataFrame ({"a" : [1 , 2 , 3 ], "b" : [4 , 5 , 6 ], "c" : "a" })
@@ -197,7 +190,6 @@ def test_convert_dtypes_avoid_block_splitting(self):
197
190
tm .assert_frame_equal (result , expected )
198
191
assert result ._mgr .nblocks == 2
199
192
200
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
201
193
def test_convert_dtypes_from_arrow (self ):
202
194
# GH#56581
203
195
df = pd .DataFrame ([["a" , datetime .time (18 , 12 )]], columns = ["a" , "b" ])
0 commit comments