@@ -2147,7 +2147,7 @@ def test_fwf_compression(self):
2147
2147
def test_BytesIO_input (self ):
2148
2148
if not compat .PY3 :
2149
2149
raise nose .SkipTest ("Bytes-related test - only needs to work on Python 3" )
2150
- result = pd .read_fwf (BytesIO ("שלום\n שלום" .encode ('utf8' )), widths = [2 ,2 ])
2150
+ result = pd .read_fwf (BytesIO ("שלום\n שלום" .encode ('utf8' )), widths = [2 ,2 ], encoding = 'utf8' )
2151
2151
expected = pd .DataFrame ([["של" , "ום" ]], columns = ["של" , "ום" ])
2152
2152
tm .assert_frame_equal (result , expected )
2153
2153
data = BytesIO ("שלום::1234\n 562::123" .encode ('cp1255' ))
@@ -2319,9 +2319,9 @@ def test_variable_width_unicode(self):
2319
2319
של ום
2320
2320
''' .strip ('\r \n ' )
2321
2321
expected = pd .read_fwf (BytesIO (test .encode ('utf8' )),
2322
- colspecs = [(0 , 4 ), (5 , 9 )], header = None )
2322
+ colspecs = [(0 , 4 ), (5 , 9 )], header = None , encoding = 'utf8' )
2323
2323
tm .assert_frame_equal (expected , read_fwf (BytesIO (test .encode ('utf8' )),
2324
- header = None ))
2324
+ header = None , encoding = 'utf8' ))
2325
2325
2326
2326
2327
2327
class TestCParserHighMemory (ParserTests , unittest .TestCase ):
0 commit comments