Skip to content

Commit c3b76ee

Browse files
committed
Debugging print statements
Attempt to diagnose testing failure of Python 2 test_compression_warning https://travis-ci.org/pandas-dev/pandas/jobs/407300547#L3853
1 parent 868e671 commit c3b76ee

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pandas/io/formats/csvs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ def save(self):
134134
encoding = self.encoding
135135

136136
# GH 21227 internal compression is not used when file-like passed.
137+
print('debug_3', self.compression)
138+
print('debug_4', self.path_or_buf)
139+
print('debug_5', hasattr(self.path_or_buf, 'write'))
137140
if self.compression and hasattr(self.path_or_buf, 'write'):
138141
msg = ("compression has no effect when passing file-like "
139142
"object as input.")

pandas/tests/test_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,10 @@ def test_compression_warning(compression_only):
257257
[12.32112, 123123.2, 321321.2]],
258258
columns=['X', 'Y', 'Z'])
259259
with tm.ensure_clean() as filename:
260+
print('debug_1', compression_only)
260261
f, _handles = _get_handle(filename, 'w', compression=compression_only)
261262
with tm.assert_produces_warning(RuntimeWarning,
262263
check_stacklevel=False):
263264
with f:
265+
print('debug_2', compression_only)
264266
df.to_csv(f, compression=compression_only)

0 commit comments

Comments
 (0)