Skip to content

Commit 97f5de5

Browse files
committed
Fix kwargs in test_series_compression_defaults_to_infer
1 parent 0edffc7 commit 97f5de5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/tests/test_common.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,21 +274,21 @@ def test_dataframe_compression_defaults_to_infer(
274274
tm.assert_frame_equal(output, input)
275275

276276

277-
@pytest.mark.parametrize('write_method, write_kwargs, read_method', [
278-
('to_csv', {}, pandas.Series.from_csv),
279-
('to_json', {'typ': 'series'}, pandas.read_json),
280-
('to_pickle', {}, pandas.read_pickle),
277+
@pytest.mark.parametrize('write_method, read_method, read_kwargs', [
278+
('to_csv', pandas.Series.from_csv, {}),
279+
('to_json', pandas.read_json, {'typ': 'series'}),
280+
('to_pickle', pandas.read_pickle, {}),
281281
])
282282
def test_series_compression_defaults_to_infer(
283-
write_method, write_kwargs, read_method, compression_only):
283+
write_method, read_method, read_kwargs, compression_only):
284284
# Test that Series.to_* methods default to inferring compression from
285285
# paths. https://github.com/pandas-dev/pandas/pull/22011
286286
input = Series(100 * [0, 5, -2, 10])
287287
extension = _compression_to_extension[compression_only]
288288
with tm.ensure_clean('compressed' + extension) as path:
289289
# assumes that compression='infer' is the default
290-
getattr(input, write_method)(path, **write_kwargs)
291-
output = read_method(path, compression=compression_only)
290+
getattr(input, write_method)(path)
291+
output = read_method(path, compression=compression_only, **read_kwargs)
292292
tm.assert_series_equal(output, input)
293293

294294

0 commit comments

Comments
 (0)