diff --git a/pandas/io/tests/test_parsers.py b/pandas/io/tests/test_parsers.py index ada6ffdc34257..cf0c01c8dff50 100644 --- a/pandas/io/tests/test_parsers.py +++ b/pandas/io/tests/test_parsers.py @@ -2147,7 +2147,7 @@ def test_fwf_compression(self): def test_BytesIO_input(self): if not compat.PY3: raise nose.SkipTest("Bytes-related test - only needs to work on Python 3") - result = pd.read_fwf(BytesIO("שלום\nשלום".encode('utf8')), widths=[2,2]) + result = pd.read_fwf(BytesIO("שלום\nשלום".encode('utf8')), widths=[2,2], encoding='utf8') expected = pd.DataFrame([["של", "ום"]], columns=["של", "ום"]) tm.assert_frame_equal(result, expected) data = BytesIO("שלום::1234\n562::123".encode('cp1255')) @@ -2319,9 +2319,9 @@ def test_variable_width_unicode(self): של ום '''.strip('\r\n') expected = pd.read_fwf(BytesIO(test.encode('utf8')), - colspecs=[(0, 4), (5, 9)], header=None) + colspecs=[(0, 4), (5, 9)], header=None, encoding='utf8') tm.assert_frame_equal(expected, read_fwf(BytesIO(test.encode('utf8')), - header=None)) + header=None, encoding='utf8')) class TestCParserHighMemory(ParserTests, unittest.TestCase):