From: Mark Dickinson Date: Sat, 16 Jan 2010 20:33:02 +0000 (+0000) Subject: Add better error reporting for MemoryErrors caused by str->float conversions. X-Git-Tag: v2.7a3~137 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d87f22cec82a7c368cd2319c4fadbf4e6159f999;p=thirdparty%2FPython%2Fcpython.git Add better error reporting for MemoryErrors caused by str->float conversions. --- diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index 1883820ca5f6..189254260cd1 100644 --- a/Lib/test/test_strtod.py +++ b/Lib/test/test_strtod.py @@ -91,6 +91,8 @@ class StrtodTests(unittest.TestCase): fs = float(s) except OverflowError: got = '-inf' if s[0] == '-' else 'inf' + except MemoryError: + got = 'memory error' else: got = fs.hex() expected = strtod(s)