@@ -207,30 +207,20 @@ def test_case_md5_2(self):
207
207
self .check ('md5' , 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' ,
208
208
'd174ab98d277d9f5a5611c2c9f419d9f' )
209
209
210
- @precisionbigmemtest (size = _4G + 5 , memuse = 1 )
210
+ @unittest .skipIf (sys .maxsize < _4G + 5 , 'test cannot run on 32-bit systems' )
211
+ @precisionbigmemtest (size = _4G + 5 , memuse = 1 , dry_run = False )
211
212
def test_case_md5_huge (self , size ):
212
- if size == _4G + 5 :
213
- try :
214
- self .check ('md5' , 'A' * size , 'c9af2dff37468ce5dfee8f2cfc0a9c6d' )
215
- except OverflowError :
216
- pass # 32-bit arch
213
+ self .check ('md5' , 'A' * size , 'c9af2dff37468ce5dfee8f2cfc0a9c6d' )
217
214
218
- @precisionbigmemtest (size = _4G + 5 , memuse = 1 )
215
+ @unittest .skipIf (sys .maxsize < _4G + 5 , 'test cannot run on 32-bit systems' )
216
+ @precisionbigmemtest (size = _4G + 5 , memuse = 1 , dry_run = False )
219
217
def test_case_md5_huge_update (self , size ):
220
- if size == _4G + 5 :
221
- try :
222
- self .check_update ('md5' , 'A' * size ,
223
- 'c9af2dff37468ce5dfee8f2cfc0a9c6d' )
224
- except OverflowError :
225
- pass # 32-bit arch
218
+ self .check_update ('md5' , 'A' * size , 'c9af2dff37468ce5dfee8f2cfc0a9c6d' )
226
219
227
- @precisionbigmemtest (size = _4G - 1 , memuse = 1 )
220
+ @unittest .skipIf (sys .maxsize < _4G - 1 , 'test cannot run on 32-bit systems' )
221
+ @precisionbigmemtest (size = _4G - 1 , memuse = 1 , dry_run = False )
228
222
def test_case_md5_uintmax (self , size ):
229
- if size == _4G - 1 :
230
- try :
231
- self .check ('md5' , 'A' * size , '28138d306ff1b8281f1a9067e1a1a2b3' )
232
- except OverflowError :
233
- pass # 32-bit arch
223
+ self .check ('md5' , 'A' * size , '28138d306ff1b8281f1a9067e1a1a2b3' )
234
224
235
225
# use the three examples from Federal Information Processing Standards
236
226
# Publication 180-1, Secure Hash Standard, 1995 April 17
0 commit comments