From 2a9dc9f6463f35f57741c04c067324348922a6fd Mon Sep 17 00:00:00 2001 From: Abdulaziz Aloqeely <52792999+Aloqeely@users.noreply.github.com> Date: Mon, 13 May 2024 22:30:11 +0300 Subject: [PATCH] Backport PR #58693: TST: Fix CI failures (don't xfail postgresql / don't xfail for pyarrow=16) --- pandas/tests/io/parser/test_multi_thread.py | 11 +++++++++-- pandas/tests/io/test_sql.py | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pandas/tests/io/parser/test_multi_thread.py b/pandas/tests/io/parser/test_multi_thread.py index da9b9bddd30cd..704ca010f6506 100644 --- a/pandas/tests/io/parser/test_multi_thread.py +++ b/pandas/tests/io/parser/test_multi_thread.py @@ -12,6 +12,7 @@ import pandas as pd from pandas import DataFrame import pandas._testing as tm +from pandas.util.version import Version xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail") @@ -23,10 +24,16 @@ ] -@xfail_pyarrow # ValueError: Found non-unique column index -def test_multi_thread_string_io_read_csv(all_parsers): +@pytest.mark.filterwarnings("ignore:Passing a BlockManager:DeprecationWarning") +def test_multi_thread_string_io_read_csv(all_parsers, request): # see gh-11786 parser = all_parsers + if parser.engine == "pyarrow": + pa = pytest.importorskip("pyarrow") + if Version(pa.__version__) < Version("16.0"): + request.applymarker( + pytest.mark.xfail(reason="# ValueError: Found non-unique column index") + ) max_row_range = 100 num_files = 10 diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index ab851b02c876a..7068247bbfa8b 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -2322,7 +2322,8 @@ def test_api_read_sql_duplicate_columns(conn, request): if "adbc" in conn: pa = pytest.importorskip("pyarrow") if not ( - Version(pa.__version__) >= Version("16.0") and conn == "sqlite_adbc_conn" + Version(pa.__version__) >= Version("16.0") + and conn in ["sqlite_adbc_conn", "postgresql_adbc_conn"] ): request.node.add_marker( pytest.mark.xfail(