Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit cc710b1

Browse files
committed
TST: use BytesIO with encoded text for python3
1 parent 2985283 commit cc710b1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

RELEASE.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Where to get it
2525
pandas 0.7.0
2626
============
2727

28-
**Release date:** 2/8/2012
28+
**Release date:** NOT YET RELEASED
2929

3030
**New features / modules**
3131

pandas/io/tests/test_parsers.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
try:
2+
from io import BytesIO
3+
except ImportError: # pragma: no cover
4+
# Python < 2.6
5+
from cStringIO import StringIO as BytesIO
6+
17
from cStringIO import StringIO
28
from datetime import datetime
39
import csv
@@ -304,7 +310,7 @@ def test_sniff_delimiter(self):
304310
bar|4|5|6
305311
baz|7|8|9
306312
""".encode('utf-8')
307-
data4 = read_csv(StringIO(text), index_col=0, sep=None, skiprows=2,
313+
data4 = read_csv(BytesIO(text), index_col=0, sep=None, skiprows=2,
308314
encoding='utf-8')
309315
assert_frame_equal(data, data4)
310316

0 commit comments

Comments
 (0)