diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-12 21:50:44 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-12 21:50:44 (GMT) |
commit | e0d3f8a654a80102a7646ba1dac9bec2bbc27fc9 (patch) | |
tree | c659cb76b7837096337b379641a2c16fed9e427c /Lib | |
parent | 9dd117130554d73f9944d398c63aeddbe64418e8 (diff) | |
download | cpython-e0d3f8a654a80102a7646ba1dac9bec2bbc27fc9.zip cpython-e0d3f8a654a80102a7646ba1dac9bec2bbc27fc9.tar.gz cpython-e0d3f8a654a80102a7646ba1dac9bec2bbc27fc9.tar.bz2 |
More informative skip message in @bigaddrspace
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/support.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index 2062dd5..897d905 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -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 |