@@ -130,14 +130,9 @@ def test_catch_too_many_names(all_parsers):
130130 else "Number of passed names did not match "
131131 "number of header fields in the file"
132132 )
133- depr_msg = "Passing a BlockManager to DataFrame is deprecated"
134- warn = None
135- if parser .engine == "pyarrow" :
136- warn = DeprecationWarning
137133
138- with tm .assert_produces_warning (warn , match = depr_msg , check_stacklevel = False ):
139- with pytest .raises (ValueError , match = msg ):
140- parser .read_csv (StringIO (data ), header = 0 , names = ["a" , "b" , "c" , "d" ])
134+ with pytest .raises (ValueError , match = msg ):
135+ parser .read_csv (StringIO (data ), header = 0 , names = ["a" , "b" , "c" , "d" ])
141136
142137
143138@skip_pyarrow # CSV parse error: Empty CSV file or block
@@ -168,13 +163,7 @@ def test_suppress_error_output(all_parsers):
168163 data = "a\n 1\n 1,2,3\n 4\n 5,6,7"
169164 expected = DataFrame ({"a" : [1 , 4 ]})
170165
171- warn = None
172- if parser .engine == "pyarrow" :
173- warn = DeprecationWarning
174- msg = "Passing a BlockManager to DataFrame|make_block is deprecated"
175-
176- with tm .assert_produces_warning (warn , match = msg , check_stacklevel = False ):
177- result = parser .read_csv (StringIO (data ), on_bad_lines = "skip" )
166+ result = parser .read_csv (StringIO (data ), on_bad_lines = "skip" )
178167 tm .assert_frame_equal (result , expected )
179168
180169
0 commit comments