Skip to content

Commit 6be808d

Browse files
committed
1 parent 8a0c97e commit 6be808d

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

pandas/tests/test_common.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,8 @@ def test_standardize_mapping():
220220
Series(100 * [0.123456, 0.234567, 0.567567], name='X')])
221221
@pytest.mark.parametrize('method', ['to_pickle', 'to_json', 'to_csv'])
222222
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.
227225
extension = _compression_to_extension[compression_only]
228226
to_method = getattr(obj, method)
229227
with tm.ensure_clean('no-compression') as path:
@@ -264,17 +262,14 @@ def test_compression_size_fh(obj, method, compression_only):
264262

265263

266264
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.
278273
df = DataFrame(100 * [[0.123456, 0.234567, 0.567567],
279274
[12.32112, 123123.2, 321321.2]],
280275
columns=['X', 'Y', 'Z'])

0 commit comments

Comments
 (0)