66import numpy as np
77import pytest
88
9- from pandas ._config import using_string_dtype
10-
119from pandas ._libs .tslibs import iNaT
1210from pandas .compat import (
1311 is_ci_environment ,
@@ -412,7 +410,6 @@ def test_interchange_from_corrected_buffer_dtypes(monkeypatch) -> None:
412410 pd .api .interchange .from_dataframe (df )
413411
414412
415- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
416413def test_empty_string_column ():
417414 # https://github.com/pandas-dev/pandas/issues/56703
418415 df = pd .DataFrame ({"a" : []}, dtype = str )
@@ -421,13 +418,12 @@ def test_empty_string_column():
421418 tm .assert_frame_equal (df , result )
422419
423420
424- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
425421def test_large_string ():
426422 # GH#56702
427423 pytest .importorskip ("pyarrow" )
428424 df = pd .DataFrame ({"a" : ["x" ]}, dtype = "large_string[pyarrow]" )
429425 result = pd .api .interchange .from_dataframe (df .__dataframe__ ())
430- expected = pd .DataFrame ({"a" : ["x" ]}, dtype = "object " )
426+ expected = pd .DataFrame ({"a" : ["x" ]}, dtype = "str " )
431427 tm .assert_frame_equal (result , expected )
432428
433429
@@ -438,7 +434,6 @@ def test_non_str_names():
438434 assert names == ["0" ]
439435
440436
441- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
442437def test_non_str_names_w_duplicates ():
443438 # https://github.com/pandas-dev/pandas/issues/56701
444439 df = pd .DataFrame ({"0" : [1 , 2 , 3 ], 0 : [4 , 5 , 6 ]})
@@ -449,7 +444,7 @@ def test_non_str_names_w_duplicates():
449444 "Expected a Series, got a DataFrame. This likely happened because you "
450445 "called __dataframe__ on a DataFrame which, after converting column "
451446 r"names to string, resulted in duplicated names: Index\(\['0', '0'\], "
452- r"dtype='object'\). Please rename these columns before using the "
447+ r"dtype='(str| object) '\). Please rename these columns before using the "
453448 "interchange protocol."
454449 ),
455450 ):
0 commit comments