Skip to content

Commit b9dd271

Browse files
Backport PR #56873 on branch 2.2.x (CI: unxfail adbc-driver-postgresql test) (#56875)
Backport PR #56873: CI: unxfail adbc-driver-postgresql test Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent d11887b commit b9dd271

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)