diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-01-16 20:33:02 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-01-16 20:33:02 (GMT) |
commit | d87f22cec82a7c368cd2319c4fadbf4e6159f999 (patch) | |
tree | fdb6603e0772a180a5f0ddccc7d34c83d7b69d27 /Lib/test/test_strtod.py | |
parent | 5afe42b69bcd576aa65a8103eebf314757e67a62 (diff) | |
download | cpython-d87f22cec82a7c368cd2319c4fadbf4e6159f999.zip cpython-d87f22cec82a7c368cd2319c4fadbf4e6159f999.tar.gz cpython-d87f22cec82a7c368cd2319c4fadbf4e6159f999.tar.bz2 |
Add better error reporting for MemoryErrors caused by str->float conversions.
Diffstat (limited to 'Lib/test/test_strtod.py')
-rw-r--r-- | Lib/test/test_strtod.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index 1883820..1892542 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) |