Skip to content

Commit aef2653

Browse files
committed
Merge pull request #7388 from cpcloud/master
TST/BUG: use BytesIO for Python 3.4 TestEncoding
2 parents ef9b818 + 35d5691 commit aef2653

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/tests/test_html.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from pandas import (DataFrame, MultiIndex, read_csv, Timestamp, Index,
2222
date_range, Series)
23-
from pandas.compat import map, zip, StringIO, string_types
23+
from pandas.compat import map, zip, StringIO, string_types, BytesIO
2424
from pandas.io.common import URLError, urlopen, file_path_to_url
2525
from pandas.io.html import read_html
2626
from pandas.parser import CParserError
@@ -601,7 +601,7 @@ def read_filename(self, f, encoding):
601601

602602
def read_file_like(self, f, encoding):
603603
with open(f, 'rb') as fobj:
604-
return read_html(StringIO(fobj.read()), encoding=encoding,
604+
return read_html(BytesIO(fobj.read()), encoding=encoding,
605605
index_col=0)
606606

607607
def read_string(self, f, encoding):

0 commit comments

Comments
 (0)