mirror of https://github.com/python/cpython
Add better error reporting for MemoryErrors caused by str->float conversions.
This commit is contained in:
parent
5afe42b69b
commit
d87f22cec8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue