Skip to content

Commit 9a4dc41

Browse files
committed
Reduce / remove comments
1 parent 14c3945 commit 9a4dc41

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pandas/tests/test_common.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ def test_standardize_mapping():
221221
Series(100 * [0.123456, 0.234567, 0.567567], name='X')])
222222
@pytest.mark.parametrize('method', ['to_pickle', 'to_json', 'to_csv'])
223223
def test_compression_size(obj, method, compression_only):
224-
# Tests that compression is occurring by comparing to the bytes on disk of
225-
# the uncompressed file.
224+
226225
with tm.ensure_clean() as filename:
227226
getattr(obj, method)(filename, compression=compression_only)
228227
compressed = os.path.getsize(filename)
@@ -264,11 +263,10 @@ def test_compression_size_fh(obj, method, compression_only):
264263
def test_dataframe_compression_defaults_to_infer(
265264
write_method, write_kwargs, read_method, compression_only):
266265
# Test that DataFrame.to_* methods default to inferring compression from
267-
# paths. https://github.com/pandas-dev/pandas/pull/22011
266+
# paths. GH 22004
268267
input = DataFrame([[1.0, 0, -4.4], [3.4, 5, 2.4]], columns=['X', 'Y', 'Z'])
269268
extension = _compression_to_extension[compression_only]
270269
with tm.ensure_clean('compressed' + extension) as path:
271-
# assumes that compression='infer' is the default
272270
getattr(input, write_method)(path, **write_kwargs)
273271
output = read_method(path, compression=compression_only)
274272
tm.assert_frame_equal(output, input)
@@ -284,20 +282,18 @@ def test_series_compression_defaults_to_infer(
284282
write_method, write_kwargs, read_method, read_kwargs,
285283
compression_only):
286284
# Test that Series.to_* methods default to inferring compression from
287-
# paths. https://github.com/pandas-dev/pandas/pull/22011
285+
# paths. GH 22004
288286
input = Series([0, 5, -2, 10], name='X')
289287
extension = _compression_to_extension[compression_only]
290288
with tm.ensure_clean('compressed' + extension) as path:
291-
# assumes that compression='infer' is the default
292289
getattr(input, write_method)(path, **write_kwargs)
293290
output = read_method(path, compression=compression_only, **read_kwargs)
294291
tm.assert_series_equal(output, input, check_names=False)
295292

296293

297294
def test_compression_warning(compression_only):
298295
# Assert that passing a file object to to_csv while explicitly specifying a
299-
# compression protocol triggers a RuntimeWarning, as per
300-
# https://github.com/pandas-dev/pandas/issues/21227.
296+
# compression protocol triggers a RuntimeWarning, as per GH 21227.
301297
# Note that pytest has an issue that causes assert_produces_warning to fail
302298
# in Python 2 if the warning has occurred in previous tests
303299
# (see https://git.io/fNEBm & https://git.io/fNEBC). Hence, should this

0 commit comments

Comments
 (0)