Skip to content

Commit 425fa73

Browse files
Aloqeelymroeschkepre-commit-ci[bot]
authored
TST: Fix CI failures (don't xfail postgresql / don't xfail for pyarrow=16) (#58693)
* TST: Fix test failures for test_api_read_sql_duplicate_columns and test_multi_thread_string_io_read_csv * Fix line length * xfail if pyarrow version < 16 * check name * Remove `strict` argument Co-authored-by: Matthew Roeschke <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Matthew Roeschke <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a2e6ddc commit 425fa73

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pandas/tests/io/parser/test_multi_thread.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import pandas as pd
1414
from pandas import DataFrame
1515
import pandas._testing as tm
16+
from pandas.util.version import Version
1617

1718
xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
1819

@@ -24,10 +25,16 @@
2425
]
2526

2627

27-
@xfail_pyarrow # ValueError: Found non-unique column index
28-
def test_multi_thread_string_io_read_csv(all_parsers):
28+
@pytest.mark.filterwarnings("ignore:Passing a BlockManager:DeprecationWarning")
29+
def test_multi_thread_string_io_read_csv(all_parsers, request):
2930
# see gh-11786
3031
parser = all_parsers
32+
if parser.engine == "pyarrow":
33+
pa = pytest.importorskip("pyarrow")
34+
if Version(pa.__version__) < Version("16.0"):
35+
request.applymarker(
36+
pytest.mark.xfail(reason="# ValueError: Found non-unique column index")
37+
)
3138
max_row_range = 100
3239
num_files = 10
3340

pandas/tests/io/test_sql.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,8 @@ def test_api_read_sql_duplicate_columns(conn, request):
23022302
if "adbc" in conn:
23032303
pa = pytest.importorskip("pyarrow")
23042304
if not (
2305-
Version(pa.__version__) >= Version("16.0") and conn == "sqlite_adbc_conn"
2305+
Version(pa.__version__) >= Version("16.0")
2306+
and conn in ["sqlite_adbc_conn", "postgresql_adbc_conn"]
23062307
):
23072308
request.node.add_marker(
23082309
pytest.mark.xfail(

0 commit comments

Comments
 (0)