@@ -218,18 +218,17 @@ def test_strict_error_handling(self):
218218
219219 @unittest .skipUnless (_testcapi .INT_MAX < _testcapi .PY_SSIZE_T_MAX ,
220220 "needs UINT_MAX < SIZE_MAX" )
221- def test_issue16335 (self ):
221+ @support .bigmemtest (size = _testcapi .UINT_MAX + 1 ,
222+ memuse = 1 + 1 , dry_run = False )
223+ def test_issue16335 (self , size ):
222224 # very very long bogus character name
223- try :
224- x = b'\\ N{SPACE' + b'x' * (_testcapi .UINT_MAX + 1 ) + b'}'
225- self .assertEqual (len (x ), len (b'\\ N{SPACE}' ) +
226- (_testcapi .UINT_MAX + 1 ))
227- self .assertRaisesRegex (UnicodeError ,
228- 'unknown Unicode character name' ,
229- x .decode , 'unicode-escape'
230- )
231- except MemoryError :
232- raise unittest .SkipTest ("not enough memory" )
225+ x = b'\\ N{SPACE' + b'x' * (_testcapi .UINT_MAX + 1 ) + b'}'
226+ self .assertEqual (len (x ), len (b'\\ N{SPACE}' ) +
227+ (_testcapi .UINT_MAX + 1 ))
228+ self .assertRaisesRegex (UnicodeError ,
229+ 'unknown Unicode character name' ,
230+ x .decode , 'unicode-escape'
231+ )
233232
234233
235234def test_main ():
0 commit comments