More informative skip message in @bigaddrspace
This commit is contained in:
parent
9dd1171305
commit
e0d3f8a654
|
@ -1039,9 +1039,13 @@ def bigaddrspacetest(f):
|
|||
"""Decorator for tests that fill the address space."""
|
||||
def wrapper(self):
|
||||
if max_memuse < MAX_Py_ssize_t:
|
||||
if verbose:
|
||||
sys.stderr.write("Skipping %s because of memory "
|
||||
"constraint\n" % (f.__name__,))
|
||||
if MAX_Py_ssize_t > 2**32:
|
||||
raise unittest.SkipTest(
|
||||
"not enough memory: try a 32-bit build instead")
|
||||
else:
|
||||
raise unittest.SkipTest(
|
||||
"not enough memory: %.1fG minimum needed"
|
||||
% (MAX_Py_ssize_t / (1024 ** 3)))
|
||||
else:
|
||||
return f(self)
|
||||
return wrapper
|
||||
|
|
Loading…
Reference in New Issue