@@ -192,8 +192,8 @@ def test_bug_5888452(self):
192
192
marshal .dumps ([128 ] * 1000 )
193
193
194
194
def test_patch_873224 (self ):
195
- self .assertRaises (Exception , marshal .loads , '0' )
196
- self .assertRaises (Exception , marshal .loads , 'f' )
195
+ self .assertRaises (Exception , marshal .loads , b '0' )
196
+ self .assertRaises (Exception , marshal .loads , b 'f' )
197
197
self .assertRaises (Exception , marshal .loads , marshal .dumps (2 ** 65 )[:- 1 ])
198
198
199
199
def test_version_argument (self ):
@@ -204,7 +204,8 @@ def test_version_argument(self):
204
204
def test_fuzz (self ):
205
205
# simple test that it's at least not *totally* trivial to
206
206
# crash from bad marshal data
207
- for c in [chr (i ) for i in range (256 )]:
207
+ for i in range (256 ):
208
+ c = bytes ([i ])
208
209
try :
209
210
marshal .loads (c )
210
211
except Exception :
@@ -318,7 +319,7 @@ def readinto(self, buf):
318
319
self .assertRaises (ValueError , marshal .load ,
319
320
BadReader (marshal .dumps (value )))
320
321
321
- def _test_eof (self ):
322
+ def test_eof (self ):
322
323
data = marshal .dumps (("hello" , "dolly" , None ))
323
324
for i in range (len (data )):
324
325
self .assertRaises (EOFError , marshal .loads , data [0 : i ])
0 commit comments