STINNER Victor added the comment:

>     self.assertRaises(OverflowError, ("�"*(2**32//12 + 1)).upper)
> MemoryError

Hum, even with the PEP 393, this string is still large: 682 MB.

$ python3
Python 3.4.1 (default, Nov  3 2014, 14:38:10) 
>>> sys.getsizeof("�"*(2**32//12 + 1)) / 1024.**2
682.6667385101318

I guess that Serhiy suggests to put a @bigmemtest decorator on 
test_case_operation_overflow().

The test expects that large_string.upper() raises immediatly an OverflowError, 
so I understand that a new string is not created.

Hum, it's strange to have an OverflowError here. Integer overflow on memory 
allocation usually raises MemoryError, not OverflowError. It looks like 
unicodeobject.c is not consistent here.

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22643>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to