Skip to content

TST: assert helpful errors for never-supported pyarrow read_csv cases#65861

Open
jbrockmendel wants to merge 1 commit into
pandas-dev:mainfrom
jbrockmendel:tst-pyarrow-csv-2
Open

TST: assert helpful errors for never-supported pyarrow read_csv cases#65861
jbrockmendel wants to merge 1 commit into
pandas-dev:mainfrom
jbrockmendel:tst-pyarrow-csv-2

Conversation

@jbrockmendel

Copy link
Copy Markdown
Member

Many pyarrow-engine read_csv xfails can never pass: they exercise options the engine intentionally rejects (list/callable skiprows, regex separators, non-default quoting, thousands, nrows, chunksize, dayfirst, dict/non-string na_values). For these, the best we can do is raise a helpful error — which we already do — so convert the xfails to assert that message, using the raises-and-return pattern already common in these files.

  • 36 tests converted across test_skiprows.py, test_quoting.py, test_parse_dates.py, test_na_values.py, test_multi_thread.py, test_header.py
  • Parametrized cases that fail for other (potentially fixable) reasons keep a conditional xfail via request.applymarker (e.g. test_skip_rows_bug[6], test_null_quote_char with default quoting)

Test-only; no behavior change.

🤖 Generated with Claude Code

Convert pyarrow-engine xfails that can never pass (intentionally
unsupported options) to assert the helpful error message instead, using
the established raises-and-return pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jbrockmendel jbrockmendel added Testing pandas testing functions or related to the test suite IO CSV read_csv, to_csv Arrow pyarrow functionality labels Jun 11, 2026
@jbrockmendel jbrockmendel marked this pull request as ready for review June 12, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arrow pyarrow functionality IO CSV read_csv, to_csv Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant