33import numpy as np
44import pytest
55
6- from pandas ._config import using_string_dtype
7-
86import pandas as pd
97import pandas ._testing as tm
108
119
1210class 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)" )
1511 @pytest .mark .parametrize (
1612 "convert_integer, expected" , [(False , np .dtype ("int32" )), (True , "Int32" )]
1713 )
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 ):
2115 # Specific types are tested in tests/series/test_dtypes.py
2216 # Just check that it works for DataFrame here
2317 df = pd .DataFrame (
@@ -182,7 +176,6 @@ def test_convert_dtypes_pyarrow_timestamp(self):
182176 result = expected .convert_dtypes (dtype_backend = "pyarrow" )
183177 tm .assert_series_equal (result , expected )
184178
185- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
186179 def test_convert_dtypes_avoid_block_splitting (self ):
187180 # GH#55341
188181 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):
197190 tm .assert_frame_equal (result , expected )
198191 assert result ._mgr .nblocks == 2
199192
200- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
201193 def test_convert_dtypes_from_arrow (self ):
202194 # GH#56581
203195 df = pd .DataFrame ([["a" , datetime .time (18 , 12 )]], columns = ["a" , "b" ])
0 commit comments