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.
........
This commit is contained in:
Mark Dickinson 2010-01-16 20:34:30 +00:00
parent 732b6822bf
commit 1c7d69b8a8
1 changed files with 2 additions and 0 deletions

View File

@ -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)