6363 pytest .mark .filterwarnings (
6464 "ignore:Passing a BlockManager to DataFrame:DeprecationWarning"
6565 ),
66- pytest .mark .xfail ( using_string_dtype (), reason = "TODO(infer_string)" , strict = False ) ,
66+ pytest .mark .single_cpu ,
6767]
6868
6969
@@ -685,6 +685,7 @@ def postgresql_psycopg2_conn(postgresql_psycopg2_engine):
685685
686686@pytest .fixture
687687def postgresql_adbc_conn ():
688+ pytest .importorskip ("pyarrow" )
688689 pytest .importorskip ("adbc_driver_postgresql" )
689690 from adbc_driver_postgresql import dbapi
690691
@@ -817,6 +818,7 @@ def sqlite_conn_types(sqlite_engine_types):
817818
818819@pytest .fixture
819820def sqlite_adbc_conn ():
821+ pytest .importorskip ("pyarrow" )
820822 pytest .importorskip ("adbc_driver_sqlite" )
821823 from adbc_driver_sqlite import dbapi
822824
@@ -986,13 +988,13 @@ def test_dataframe_to_sql(conn, test_frame1, request):
986988
987989@pytest .mark .parametrize ("conn" , all_connectable )
988990def test_dataframe_to_sql_empty (conn , test_frame1 , request ):
989- if conn == "postgresql_adbc_conn" :
991+ if conn == "postgresql_adbc_conn" and not using_string_dtype () :
990992 request .node .add_marker (
991993 pytest .mark .xfail (
992- reason = "postgres ADBC driver cannot insert index with null type" ,
993- strict = True ,
994+ reason = "postgres ADBC driver < 1.2 cannot insert index with null type" ,
994995 )
995996 )
997+
996998 # GH 51086 if conn is sqlite_engine
997999 conn = request .getfixturevalue (conn )
9981000 empty_df = test_frame1 .iloc [:0 ]
@@ -3571,7 +3573,8 @@ def test_read_sql_dtype_backend(
35713573 result = getattr (pd , func )(
35723574 f"Select * from { table } " , conn , dtype_backend = dtype_backend
35733575 )
3574- expected = dtype_backend_expected (string_storage , dtype_backend , conn_name )
3576+ expected = dtype_backend_expected (string_storage , dtype_backend , conn_name )
3577+
35753578 tm .assert_frame_equal (result , expected )
35763579
35773580 if "adbc" in conn_name :
@@ -3621,7 +3624,7 @@ def test_read_sql_dtype_backend_table(
36213624
36223625 with pd .option_context ("mode.string_storage" , string_storage ):
36233626 result = getattr (pd , func )(table , conn , dtype_backend = dtype_backend )
3624- expected = dtype_backend_expected (string_storage , dtype_backend , conn_name )
3627+ expected = dtype_backend_expected (string_storage , dtype_backend , conn_name )
36253628 tm .assert_frame_equal (result , expected )
36263629
36273630 if "adbc" in conn_name :
@@ -4150,7 +4153,7 @@ def tquery(query, con=None):
41504153def test_xsqlite_basic (sqlite_buildin ):
41514154 frame = DataFrame (
41524155 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
4153- columns = Index (list ("ABCD" ), dtype = object ),
4156+ columns = Index (list ("ABCD" )),
41544157 index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
41554158 )
41564159 assert sql .to_sql (frame , name = "test_table" , con = sqlite_buildin , index = False ) == 10
@@ -4177,7 +4180,7 @@ def test_xsqlite_basic(sqlite_buildin):
41774180def test_xsqlite_write_row_by_row (sqlite_buildin ):
41784181 frame = DataFrame (
41794182 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
4180- columns = Index (list ("ABCD" ), dtype = object ),
4183+ columns = Index (list ("ABCD" )),
41814184 index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
41824185 )
41834186 frame .iloc [0 , 0 ] = np .nan
@@ -4200,7 +4203,7 @@ def test_xsqlite_write_row_by_row(sqlite_buildin):
42004203def test_xsqlite_execute (sqlite_buildin ):
42014204 frame = DataFrame (
42024205 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
4203- columns = Index (list ("ABCD" ), dtype = object ),
4206+ columns = Index (list ("ABCD" )),
42044207 index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
42054208 )
42064209 create_sql = sql .get_schema (frame , "test" )
@@ -4221,7 +4224,7 @@ def test_xsqlite_execute(sqlite_buildin):
42214224def test_xsqlite_schema (sqlite_buildin ):
42224225 frame = DataFrame (
42234226 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
4224- columns = Index (list ("ABCD" ), dtype = object ),
4227+ columns = Index (list ("ABCD" )),
42254228 index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
42264229 )
42274230 create_sql = sql .get_schema (frame , "test" )
0 commit comments