Skip to content

Commit

Permalink
TST: Fix CI failures (don't xfail postgresql / don't xfail for pyarro…
Browse files Browse the repository at this point in the history
…w=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 <10647082+mroeschke@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed May 13, 2024
1 parent a2e6ddc commit 425fa73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions pandas/tests/io/parser/test_multi_thread.py
Expand Up @@ -13,6 +13,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")

Expand All @@ -24,10 +25,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

Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/io/test_sql.py
Expand Up @@ -2302,7 +2302,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(
Expand Down

0 comments on commit 425fa73

Please sign in to comment.