[Python-checkins] r87973 - python/branches/py3k/Lib/test/support.py
antoine.pitrou
python-checkins at python.org
Wed Jan 12 22:50:44 CET 2011
Author: antoine.pitrou
Date: Wed Jan 12 22:50:44 2011
New Revision: 87973
Log:
More informative skip message in @bigaddrspace
Modified:
python/branches/py3k/Lib/test/support.py
Modified: python/branches/py3k/Lib/test/support.py
==============================================================================
--- python/branches/py3k/Lib/test/support.py (original)
+++ python/branches/py3k/Lib/test/support.py Wed Jan 12 22:50:44 2011
@@ -1039,9 +1039,13 @@
"""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
More information about the Python-checkins
mailing list