Skip to content

Commit 874a4bf

Browse files
committed
Fix test failure
Not sure why the series name did not round-trip. Could be a pandas bug, but one not related to compression inferrence.
1 parent 83bc0a8 commit 874a4bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/test_common.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,14 @@ def test_dataframe_compression_defaults_to_infer(
275275

276276

277277
@pytest.mark.parametrize('write_method,write_kwargs,read_method,read_kwargs', [
278-
('to_csv', {'index': False, 'header': True}, pandas.read_csv, {'squeeze': True}),
278+
('to_csv', {'index': False, 'header': True},
279+
pandas.read_csv, {'squeeze': True}),
279280
('to_json', {}, pandas.read_json, {'typ': 'series'}),
280281
('to_pickle', {}, pandas.read_pickle, {}),
281282
])
282283
def test_series_compression_defaults_to_infer(
283-
write_method, write_kwargs, read_method, read_kwargs, compression_only):
284+
write_method, write_kwargs, read_method, read_kwargs, compression_only
285+
):
284286
# Test that Series.to_* methods default to inferring compression from
285287
# paths. https://github.com/pandas-dev/pandas/pull/22011
286288
input = Series([0, 5, -2, 10], name='X')
@@ -289,7 +291,7 @@ def test_series_compression_defaults_to_infer(
289291
# assumes that compression='infer' is the default
290292
getattr(input, write_method)(path, **write_kwargs)
291293
output = read_method(path, compression=compression_only, **read_kwargs)
292-
tm.assert_series_equal(output, input)
294+
tm.assert_series_equal(output, input, check_names=False)
293295

294296

295297
def test_compression_warning(compression_only):

0 commit comments

Comments
 (0)