11import datetime
2+ import sys
23from pathlib import Path
34
45import adbc_driver_manager .dbapi
89
910import adbc_driver_duckdb .dbapi
1011
12+ xfail = pytest .mark .xfail
1113driver_path = adbc_driver_duckdb .driver_path ()
1214
1315
@@ -27,6 +29,7 @@ def example_table():
2729 )
2830
2931
32+ @xfail (sys .platform == "win32" , reason = "adbc-driver-manager.adbc_get_info() returns an empty dict on windows" )
3033def test_connection_get_info (duck_conn ):
3134 assert duck_conn .adbc_get_info () != {}
3235
@@ -39,6 +42,9 @@ def test_connection_get_table_types(duck_conn):
3942 assert duck_conn .adbc_get_table_types () == ["BASE TABLE" ]
4043
4144
45+ @xfail (
46+ sys .platform == "win32" , reason = "adbc-driver-manager.adbc_get_objects() returns an invalid schema dict on windows"
47+ )
4248def test_connection_get_objects (duck_conn ):
4349 with duck_conn .cursor () as cursor :
4450 cursor .execute ("CREATE TABLE getobjects (ints BIGINT PRIMARY KEY)" )
@@ -60,6 +66,9 @@ def test_connection_get_objects(duck_conn):
6066 assert depth_all .schema == depth_catalogs .schema
6167
6268
69+ @xfail (
70+ sys .platform == "win32" , reason = "adbc-driver-manager.adbc_get_objects() returns an invalid schema dict on windows"
71+ )
6372def test_connection_get_objects_filters (duck_conn ):
6473 with duck_conn .cursor () as cursor :
6574 cursor .execute ("CREATE TABLE getobjects (ints BIGINT PRIMARY KEY)" )
@@ -198,6 +207,7 @@ def test_statement_query(duck_conn):
198207 assert cursor .fetch_arrow_table ().to_pylist () == [{"foo" : 1 }]
199208
200209
210+ @xfail (sys .platform == "win32" , reason = "adbc-driver-manager returns an invalid table schema on windows" )
201211def test_insertion (duck_conn ):
202212 table = example_table ()
203213 reader = table .to_reader ()
@@ -224,6 +234,7 @@ def test_insertion(duck_conn):
224234 assert cursor .fetch_arrow_table ().to_pydict () == {"count_star()" : [8 ]}
225235
226236
237+ @xfail (sys .platform == "win32" , reason = "adbc-driver-manager returns an invalid table schema on windows" )
227238def test_read (duck_conn ):
228239 with duck_conn .cursor () as cursor :
229240 filename = Path (__file__ ).parent / ".." / "data" / "category.csv"
0 commit comments