From 1419b4a96e04b11fef4bf7fbc0ff51d72af12457 Mon Sep 17 00:00:00 2001 From: "mark.dickinson" Date: Sat, 16 Jan 2010 20:33:02 +0000 Subject: [PATCH] Add better error reporting for MemoryErrors caused by str->float conversions. git-svn-id: http://svn.python.org/projects/python/trunk@77550 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/test/test_strtod.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index 1883820ca5..189254260c 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) -- 2.11.4.GIT