summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strtod.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-16 20:34:30 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-16 20:34:30 (GMT)
commit1c7d69b8a8726a3930419356871d9b0d02bb5a83 (patch)
tree6bfb85e4f29c0238dc890430471678d99dc6e826 /Lib/test/test_strtod.py
parent732b6822bf2a30259164467eb84a969d0f20447a (diff)
downloadcpython-1c7d69b8a8726a3930419356871d9b0d02bb5a83.zip
cpython-1c7d69b8a8726a3930419356871d9b0d02bb5a83.tar.gz
cpython-1c7d69b8a8726a3930419356871d9b0d02bb5a83.tar.bz2
Merged revisions 77550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77550 | mark.dickinson | 2010-01-16 20:33:02 +0000 (Sat, 16 Jan 2010) | 1 line 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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py
index b5a630e..a838b04 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)