Skip to content

Commit c8aa10c

Browse files
authored
TST: assert pyarrow's quoting ValueError instead of xfailing (#65402)
1 parent 4e205dd commit c8aa10c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎pandas/tests/io/parser/test_quoting.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,17 @@ def test_bad_quote_char(all_parsers, kwargs, msg):
5757
(10, 'bad "quoting" value'), # quoting must be in the range [0, 3]
5858
],
5959
)
60-
@xfail_pyarrow # ValueError: The 'quoting' option is not supported
6160
def test_bad_quoting(all_parsers, quoting, msg):
6261
data = "1,2,3"
6362
parser = all_parsers
6463

65-
with pytest.raises(TypeError, match=msg):
64+
if parser.engine == "pyarrow":
65+
# pyarrow rejects ``quoting`` outright before any value validation.
66+
msg = "The 'quoting' option is not supported with the 'pyarrow' engine"
67+
err: type[Exception] = ValueError
68+
else:
69+
err = TypeError
70+
with pytest.raises(err, match=msg):
6671
parser.read_csv(StringIO(data), quoting=quoting)
6772

6873

0 commit comments

Comments
 (0)