File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -156,13 +156,17 @@ def test_pyarrow_engine(self):
156
156
with pytest .raises (ValueError , match = msg ):
157
157
read_csv (StringIO (data ), engine = "pyarrow" , ** kwargs )
158
158
159
- def test_on_bad_lines_callable_python_only (self , all_parsers ):
159
+ def test_on_bad_lines_callable_python_or_pyarrow (self , all_parsers ):
160
160
# GH 5686
161
+ # GH 54643
161
162
sio = StringIO ("a,b\n 1,2" )
162
163
bad_lines_func = lambda x : x
163
164
parser = all_parsers
164
- if all_parsers .engine != "python" :
165
- msg = "on_bad_line can only be a callable function if engine='python'"
165
+ if all_parsers .engine not in ["python" , "pyarrow" ]:
166
+ msg = (
167
+ "on_bad_line can only be a callable "
168
+ "function if engine='python' or 'pyarrow'"
169
+ )
166
170
with pytest .raises (ValueError , match = msg ):
167
171
parser .read_csv (sio , on_bad_lines = bad_lines_func )
168
172
else :
You can’t perform that action at this time.
0 commit comments