Issue #3700: make test_bigmem py3k-compatible, and add bytes/bytearray tests

(please note: some of the tests /do/ fail when run with a sufficiently large memory parameter (-M),
perhaps because of the str/bytes/bytearray overhaul)
This commit is contained in:
Antoine Pitrou 2009-03-07 23:40:49 +00:00
parent d173589c9d
commit 7cdb495e90
2 changed files with 405 additions and 288 deletions

View file

@ -609,6 +609,10 @@ def bigmemtest(minsize, memuse, overhead=5*_1M):
"""
def decorator(f):
def wrapper(self):
# Retrieve values in case someone decided to adjust them
minsize = wrapper.minsize
memuse = wrapper.memuse
overhead = wrapper.overhead
if not max_memuse:
# If max_memuse is 0 (the default),
# we still want to run the tests with size set to a few kb,
@ -636,6 +640,9 @@ def bigmemtest(minsize, memuse, overhead=5*_1M):
def precisionbigmemtest(size, memuse, overhead=5*_1M):
def decorator(f):
def wrapper(self):
size = wrapper.size
memuse = wrapper.memuse
overhead = wrapper.overhead
if not real_max_memuse:
maxsize = 5147
else: