@@ -220,10 +220,8 @@ def test_standardize_mapping():
220
220
Series (100 * [0.123456 , 0.234567 , 0.567567 ], name = 'X' )])
221
221
@pytest .mark .parametrize ('method' , ['to_pickle' , 'to_json' , 'to_csv' ])
222
222
def test_compression_size (obj , method , compression_only ):
223
- """
224
- Tests that compression is occurring by comparing to the bytes on disk of
225
- the uncompressed file.
226
- """
223
+ # Tests that compression is occurring by comparing to the bytes on disk of
224
+ # the uncompressed file.
227
225
extension = _compression_to_extension [compression_only ]
228
226
to_method = getattr (obj , method )
229
227
with tm .ensure_clean ('no-compression' ) as path :
@@ -264,17 +262,14 @@ def test_compression_size_fh(obj, method, compression_only):
264
262
265
263
266
264
def test_compression_warning (compression_only ):
267
- """
268
- Assert that passing a file object to to_csv while explicitly specifying a
269
- compression protocol triggers a RuntimeWarning, as per
270
- https://github.com/pandas-dev/pandas/issues/21227.
271
-
272
- Note that pytest has an issue that causes assert_produces_warning to fail
273
- in Python 2 if the warning has occurred in previous tests
274
- (see https://git.io/fNEBm & https://git.io/fNEBC). Hence, should this test
275
- fail in just Python 2 builds, it likely indicates that other tests are
276
- producing RuntimeWarnings, thereby triggering the pytest bug.
277
- """
265
+ # Assert that passing a file object to to_csv while explicitly specifying a
266
+ # compression protocol triggers a RuntimeWarning, as per
267
+ # https://github.com/pandas-dev/pandas/issues/21227.
268
+ # Note that pytest has an issue that causes assert_produces_warning to fail
269
+ # in Python 2 if the warning has occurred in previous tests
270
+ # (see https://git.io/fNEBm & https://git.io/fNEBC). Hence, should this
271
+ # test fail in just Python 2 builds, it likely indicates that other tests
272
+ # are producing RuntimeWarnings, thereby triggering the pytest bug.
278
273
df = DataFrame (100 * [[0.123456 , 0.234567 , 0.567567 ],
279
274
[12.32112 , 123123.2 , 321321.2 ]],
280
275
columns = ['X' , 'Y' , 'Z' ])
0 commit comments