Skip to content

Commit 0cd7bf7

Browse files
committed
DOC: Add comments on to_csv defualt encoding test
1 parent a632835 commit 0cd7bf7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/tests/io/formats/test_to_csv.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def test_to_csv_defualt_encoding(self):
1313
df = DataFrame({'col': [u"AAAAA", u"ÄÄÄÄÄ", u"ßßßßß", u"聞聞聞聞聞"]})
1414

1515
with tm.ensure_clean('test.csv') as path:
16+
# the default to_csv encoding in Python 2 is ascii, and that in
17+
# Python 3 is uft-8.
1618
if pd.compat.PY2:
19+
# the encoding argument parameter should be utf-8
1720
with tm.assert_raises_regex(UnicodeEncodeError, 'ascii'):
1821
df.to_csv(path)
1922
else:

0 commit comments

Comments
 (0)