Skip to content

Commit 92f56da

Browse files
MarcoGorellipmhatre1
authored andcommitted
CI: unxfail adbc-driver-postgresql test (pandas-dev#56873)
* unxfail adbc-driver-postgresql test * conditional xfail * catch None * adbc_driver_manager -> adbc_driver_postgresql
1 parent 90df53d commit 92f56da

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/tests/io/test_sql.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -2229,12 +2229,14 @@ def test_api_chunksize_read(conn, request):
22292229
@pytest.mark.parametrize("conn", all_connectable)
22302230
def test_api_categorical(conn, request):
22312231
if conn == "postgresql_adbc_conn":
2232-
request.node.add_marker(
2233-
pytest.mark.xfail(
2234-
reason="categorical dtype not implemented for ADBC postgres driver",
2235-
strict=True,
2232+
adbc = import_optional_dependency("adbc_driver_postgresql", errors="ignore")
2233+
if adbc is not None and Version(adbc.__version__) < Version("0.9.0"):
2234+
request.node.add_marker(
2235+
pytest.mark.xfail(
2236+
reason="categorical dtype not implemented for ADBC postgres driver",
2237+
strict=True,
2238+
)
22362239
)
2237-
)
22382240
# GH8624
22392241
# test that categorical gets written correctly as dense column
22402242
conn = request.getfixturevalue(conn)

0 commit comments

Comments
 (0)