@@ -274,21 +274,21 @@ def test_dataframe_compression_defaults_to_infer(
274
274
tm .assert_frame_equal (output , input )
275
275
276
276
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 , {} ),
281
281
])
282
282
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 ):
284
284
# Test that Series.to_* methods default to inferring compression from
285
285
# paths. https://github.com/pandas-dev/pandas/pull/22011
286
286
input = Series (100 * [0 , 5 , - 2 , 10 ])
287
287
extension = _compression_to_extension [compression_only ]
288
288
with tm .ensure_clean ('compressed' + extension ) as path :
289
289
# 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 )
292
292
tm .assert_series_equal (output , input )
293
293
294
294
0 commit comments